diff --git a/test/test-checkout.sh b/test/test-checkout.sh index b0acec7a..1a5f2df5 100755 --- a/test/test-checkout.sh +++ b/test/test-checkout.sh @@ -53,25 +53,23 @@ begin_test "checkout" rm -rf file1.dat file2.dat file3.dat folder1/nested.dat folder2/nested.dat echo "checkout with filters" - git lfs checkout file2.dat 2>&1 | tee checkout.log + git lfs checkout file2.dat [ "$contents" = "$(cat file2.dat)" ] [ ! -f file1.dat ] [ ! -f file3.dat ] [ ! -f folder1/nested.dat ] [ ! -f folder2/nested.dat ] - grep "Checking out LFS objects: 100% (1/1), 19 B" checkout.log echo "quotes to avoid shell globbing" - git lfs checkout "file*.dat" 2>&1 | tee checkout.log + git lfs checkout "file*.dat" [ "$contents" = "$(cat file1.dat)" ] [ "$contents" = "$(cat file3.dat)" ] [ ! -f folder1/nested.dat ] [ ! -f folder2/nested.dat ] - grep "Checking out LFS objects: 100% (3/3), 57 B" checkout.log echo "test subdir context" pushd folder1 - git lfs checkout nested.dat 2>&1 | tee checkout.log + git lfs checkout nested.dat 2>&1 grep "Checking out LFS objects: 100% (1/1), 19 B" checkout.log [ "$contents" = "$(cat nested.dat)" ] [ ! -f ../folder2/nested.dat ] @@ -79,35 +77,31 @@ begin_test "checkout" rm nested.dat git lfs checkout . 2>&1 | tee checkout.log [ "$contents" = "$(cat nested.dat)" ] - grep "Checking out LFS objects: 100% (1/1), 19 B" checkout.log popd echo "test folder param" - git lfs checkout folder2 2>&1 | tee checkout.log + git lfs checkout folder2 [ "$contents" = "$(cat folder2/nested.dat)" ] - grep "Checking out LFS objects: 100% (1/1), 19 B" checkout.log echo "test '.' in current dir" rm -rf file1.dat file2.dat file3.dat folder1/nested.dat folder2/nested.dat - git lfs checkout . 2>&1 | tee checkout.log + git lfs checkout . [ "$contents" = "$(cat file1.dat)" ] [ "$contents" = "$(cat file2.dat)" ] [ "$contents" = "$(cat file3.dat)" ] [ "$contents" = "$(cat folder1/nested.dat)" ] [ "$contents" = "$(cat folder2/nested.dat)" ] - grep "Checking out LFS objects: 100% (5/5), 95 B" checkout.log echo "test checkout with missing data doesn't fail" git push origin master rm -rf .git/lfs/objects rm file*.dat - git lfs checkout 2>&1 | tee checkout.log + git lfs checkout [ "$(pointer $contents_oid $contentsize)" = "$(cat file1.dat)" ] [ "$(pointer $contents_oid $contentsize)" = "$(cat file2.dat)" ] [ "$(pointer $contents_oid $contentsize)" = "$(cat file3.dat)" ] [ "$contents" = "$(cat folder1/nested.dat)" ] [ "$contents" = "$(cat folder2/nested.dat)" ] - grep "Checking out LFS objects: 100% (5/5), 95 B" checkout.log ) end_test