Code

Merge branch 'jn/run-command-error-failure'
[git.git] / t / t1020-subdirectory.sh
index a3ac33801a28fe7bd2ce67d4d4ae306c1050f5c1..ddc3921ac6a009dfc706cd19ad94f2b29af4b1cc 100755 (executable)
@@ -110,6 +110,35 @@ test_expect_success 'read-tree' '
        )
 '
 
+test_expect_success 'alias expansion' '
+       (
+               git config alias.ss status &&
+               cd dir &&
+               git status &&
+               git ss
+       )
+'
+
+test_expect_success '!alias expansion' '
+       pwd >expect &&
+       (
+               git config alias.test !pwd &&
+               cd dir &&
+               git test >../actual
+       ) &&
+       test_cmp expect actual
+'
+
+test_expect_success 'GIT_PREFIX for !alias' '
+       printf "dir/" >expect &&
+       (
+               git config alias.test "!sh -c \"printf \$GIT_PREFIX\"" &&
+               cd dir &&
+               git test >../actual
+       ) &&
+       test_cmp expect actual
+'
+
 test_expect_success 'no file/rev ambiguity check inside .git' '
        git commit -a -m 1 &&
        (