summaryrefslogtreecommitdiff
path: root/t/t3903-stash.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t3903-stash.sh')
-rwxr-xr-xt/t3903-stash.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
index b71d1e6..4046817 100755
--- a/t/t3903-stash.sh
+++ b/t/t3903-stash.sh
@@ -812,6 +812,22 @@ test_expect_success 'stash -- <pathspec> stashes and restores the file' '
test_path_is_file bar
'
+test_expect_success 'stash -- <pathspec> stashes in subdirectory' '
+ mkdir sub &&
+ >foo &&
+ >bar &&
+ git add foo bar &&
+ (
+ cd sub &&
+ git stash push -- ../foo
+ ) &&
+ test_path_is_file bar &&
+ test_path_is_missing foo &&
+ git stash pop &&
+ test_path_is_file foo &&
+ test_path_is_file bar
+'
+
test_expect_success 'stash with multiple pathspec arguments' '
>foo &&
>bar &&
@@ -865,7 +881,7 @@ test_expect_success 'stash push -p with pathspec shows no changes only once' '
git stash push -p foo >actual &&
echo "No local changes to save" >expect &&
git reset --hard HEAD~ &&
- test_cmp expect actual
+ test_i18ncmp expect actual
'
test_expect_success 'stash push with pathspec shows no changes when there are none' '
@@ -875,7 +891,7 @@ test_expect_success 'stash push with pathspec shows no changes when there are no
git stash push foo >actual &&
echo "No local changes to save" >expect &&
git reset --hard HEAD~ &&
- test_cmp expect actual
+ test_i18ncmp expect actual
'
test_expect_success 'stash push with pathspec not in the repository errors out' '