diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2011-05-08 18:08:26 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-05-10 12:42:59 -0700 |
commit | 6fd09f537c7a1b0a92587aa6f00ef7302a546a1e (patch) | |
tree | 029eaf5faf11a634b4d53f3a0ae6b6dada42b7ed /t/t4208-log-magic-pathspec.sh | |
parent | 0e539dca51c298ca2ee102e0ca118797f2da99eb (diff) | |
download | git-6fd09f537c7a1b0a92587aa6f00ef7302a546a1e.tar.gz |
t3703, t4208: add test cases for magic pathspec
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4208-log-magic-pathspec.sh')
-rwxr-xr-x | t/t4208-log-magic-pathspec.sh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/t/t4208-log-magic-pathspec.sh b/t/t4208-log-magic-pathspec.sh new file mode 100755 index 0000000000..2c482b622b --- /dev/null +++ b/t/t4208-log-magic-pathspec.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +test_description='magic pathspec tests using git-log' + +. ./test-lib.sh + +test_expect_success 'setup' ' + test_commit initial && + test_tick && + git commit --allow-empty -m empty && + mkdir sub +' + +test_expect_success '"git log :/" should be ambiguous' ' + test_must_fail git log :/ 2>error && + grep ambiguous error +' + +test_expect_success '"git log :" should be ambiguous' ' + test_must_fail git log : 2>error && + grep ambiguous error +' + +test_expect_success 'git log -- :' ' + git log -- : +' + +test_expect_success 'git log HEAD -- :/' ' + cat >expected <<-EOF && + 24b24cf initial + EOF + (cd sub && git log --oneline HEAD -- :/ >../actual) && + test_cmp expected actual +' + +test_done |