t / t3020-ls-files-error-unmatch.shon commit Merge branch 'bn/http-cookiefile-config' (459000e)
   1#!/bin/sh
   2#
   3# Copyright (c) 2006 Carl D. Worth
   4#
   5
   6test_description='git ls-files test for --error-unmatch option
   7
   8This test runs git ls-files --error-unmatch to ensure it correctly
   9returns an error when a non-existent path is provided on the command
  10line.
  11'
  12. ./test-lib.sh
  13
  14test_expect_success 'setup' '
  15        touch foo bar &&
  16        git update-index --add foo bar &&
  17        git commit -m "add foo bar"
  18'
  19
  20test_expect_success \
  21    'git ls-files --error-unmatch should fail with unmatched path.' \
  22    'test_must_fail git ls-files --error-unmatch foo bar-does-not-match'
  23
  24test_expect_success \
  25    'git ls-files --error-unmatch should succeed with matched paths.' \
  26    'git ls-files --error-unmatch foo bar'
  27
  28test_done