From bf0e10a32158782ef36f2403c76f21cf6b64fbe7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20K=C3=A4ufl?= Date: Mon, 1 Jun 2015 12:38:51 +0200 Subject: [PATCH] Added test concerning recognition of duplicate paths --- test/test-track.sh | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/test/test-track.sh b/test/test-track.sh index 705d4da4..ee204727 100755 --- a/test/test-track.sh +++ b/test/test-track.sh @@ -107,3 +107,49 @@ begin_test "track outside git repo" fi ) end_test + +begin_test "track representation" +( + set -e + + git init track-representation + cd track-representation + + git lfs track "*.jpg" + out=$(git lfs track "$PWD/*.jpg") + + if [ "$out" != "$PWD/*.jpg already supported" ]; then + echo "Track didn't recognize duplicate path" + cat .gitattributes + exit 1 + fi + + out2=$(git lfs track "a/../*.jpg") + + if [ "$out2" != "a/../*.jpg already supported" ]; then + echo "Track didn't recognize duplicate path" + cat .gitattributes + exit 1 + fi + + mkdir a + git lfs track "a/test.file" + cd a + out3=$(git lfs track "test.file") + + if [ "$out3" != "test.file already supported" ]; then + echo "Track didn't recognize duplicate path" + cat .gitattributes + exit 1 + fi + + git lfs track "file.bin" + cd .. + out4=$(git lfs track "a/file.bin") + if [ "$out4" != "a/file.bin already supported" ]; then + echo "Track didn't recognize duplicate path" + cat .gitattributes + exit 1 + fi +) +end_test