Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 4fa9013

Browse files
committed
Add a test for other types and modes
1 parent 61186c9 commit 4fa9013

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: test/Semantic/Spec.hs

+5
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,10 @@ spec = do
4444
let expected = [ TreeEntry NormalMode TreeObject (OID "abcdef") "/this/is/the/path", TreeEntry SymlinkMode BlobObject (OID "17776") "/dev/urandom"]
4545
parseEntries input `shouldBe` expected
4646

47+
it "parses submodules and other types" $ do
48+
let input = "160000 commit 50865e8895c54037bf06c4c1691aa925d030a59d\tgemoji"
49+
let expected = Right $ TreeEntry OtherMode OtherObjectType (OID "50865e8895c54037bf06c4c1691aa925d030a59d") "gemoji"
50+
parseEntry input `shouldBe` expected
51+
4752
where
4853
methodsBlob = makeBlob "def foo\nend\n" "methods.rb" Ruby mempty

0 commit comments

Comments
 (0)