t / t0400-ls-files.shon commit t/Makefile cleanup (902d960)
   1#!/bin/sh
   2#
   3# Copyright (c) 2005 Junio C Hamano
   4#
   5
   6test_description='git-ls-files test (--others should pick up symlinks).
   7
   8This test runs git-ls-files --others with the following on the
   9filesystem.
  10
  11    path0       - a file
  12    path1       - a symlink
  13    path2/file2 - a file in a directory
  14'
  15. ./test-lib.sh
  16
  17date >path0
  18ln -s xyzzy path1
  19mkdir path2
  20date >path2/file2
  21test_expect_success \
  22    'git-ls-files --others to show output.' \
  23    'git-ls-files --others >.output'
  24cat >.expected <<EOF
  25path0
  26path1
  27path2/file2
  28EOF
  29
  30test_expect_success \
  31    'git-ls-files --others should pick up symlinks.' \
  32    'diff .output .expected'
  33test_done