git-commit-vandalism/t/t0400-ls-files.sh
Junio C Hamano 368f99d57e [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>
2005-05-14 17:41:01 +02:00

34 lines
637 B
Bash
Executable File

#!/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