summaryrefslogtreecommitdiff
path: root/t/t0400-ls-files.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-05-13 22:52:42 -0700
committerLibravatar Petr Baudis <xpasky@machine.sinus.cz>2005-05-14 17:41:01 +0200
commit368f99d57e8ed17243f2e164431449d48bfca2fb (patch)
treee796629de967435998081b62f62a14de08178965 /t/t0400-ls-files.sh
parent[PATCH 1/2] Test framework take two. (diff)
downloadtgif-368f99d57e8ed17243f2e164431449d48bfca2fb.tar.xz
[PATCH 2/2] The core GIT tests: recent additions and fixes.
This set of scripts are designed to test the features and fixes we recently added to core GIT. The convention to call test helper function has been changed during the framework cleanup (take two), and these tests have been updated to use the cleaned up test-lib.sh interface. Signed-off-by: Junio C Hamano <junkio@cox.net> Note that this does not include the t2000-diff.sh script since it tests a patch which was not applied yet. Signed-off-by: Petr Baudis <pasky@ucw.cz>
Diffstat (limited to 't/t0400-ls-files.sh')
-rwxr-xr-xt/t0400-ls-files.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/t0400-ls-files.sh b/t/t0400-ls-files.sh
new file mode 100755
index 0000000000..7f93e1cce6
--- /dev/null
+++ b/t/t0400-ls-files.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Copyright (c) 2005 Junio C Hamano
+#
+
+test_description='git-ls-files test (--others should pick up symlinks).
+
+This test runs git-ls-files --others with the following on the
+filesystem.
+
+ path0 - a file
+ path1 - a symlink
+ path2/file2 - a file in a directory
+'
+. ./test-lib.sh
+
+date >path0
+ln -s xyzzy path1
+mkdir path2
+date >path2/file2
+test_expect_success \
+ 'git-ls-files --others to show output.' \
+ 'git-ls-files --others >.output'
+cat >.expected <<EOF
+path0
+path1
+path2/file2
+EOF
+
+test_expect_success \
+ 'git-ls-files --others should pick up symlinks.' \
+ 'diff .output .expected'
+test_done