Re: [PATCH v3 2/4] stash: add test for stashing in a detached state
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- May 28, 2017, 17:57 UTC
- Message-ID
- <CACBZZX4anGGe1i-jtasPbfRbye-OXQMyWO5T1oFdJajnS=d1rA@mail.gmail.com>
- In-Reply-To
- <20170528165642.14699-3-joel@teichroeb.net>
On Sun, May 28, 2017 at 6:56 PM, Joel Teichroeb <joel@teichroeb.net> wrote:
Show 22 quoted lines
> Signed-off-by: Joel Teichroeb <joel@teichroeb.net>
> ---
> t/t3903-stash.sh | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
> index aaae221304..b86851ef46 100755
> --- a/t/t3903-stash.sh
> +++ b/t/t3903-stash.sh
> @@ -808,6 +808,17 @@ test_expect_success 'create with multiple arguments for the message' '
> test_cmp expect actual
> '
>
> +test_expect_success 'create in a detached state' '
> + test_when_finished "git checkout master" &&
> + git checkout HEAD~1 &&
> + >foo &&
> + git add foo &&
> + STASH_ID=$(git stash create) &&
> + echo "WIP on (no branch): 47d5e0e initial" >expect &&
> + git show --pretty=%s -s ${STASH_ID} >actual &&
> + test_cmp expect actualI thought this needed test_i18ncmp, turns out it didn't, neither the original stash code nor your replacement translates this. That's fine, just a note to other reviewers...
Show 8 quoted lines
> +' > + > test_expect_success 'stash -- <pathspec> stashes and restores the file' ' > >foo && > >bar && > -- > 2.13.0 >