Re: [PATCH/RFC v2 3/4] rev-parse: add tests for git rev-parse --flags.
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Sep 25, 2010, 10:29 UTC
- Message-ID
- <AANLkTin+tokb+kmbLWm6CH7T1eqNijNyGvjz6becpxD7@mail.gmail.com>
- In-Reply-To
- <1285405454-12521-5-git-send-email-jon.seymour@gmail.com>
Show 14 quoted lines
> +test_expect_success 'git rev-parse --flags -> ""' \
> +'
> + output=$(git rev-parse --flags) &&
> + expected="" &&
> + test "${output}" = "${expected}"
> +'
> +
> +test_expect_success 'git rev-parse --flags X -> ""' \
> +'
> + output=$(git rev-parse --flags X) &&
> + expected="" &&
> + test "${output}" = "${expected}"
> +'
> +Please use test_cmp throughout the test instead:
>expect &&
git rev-parse --flags >actual &&
test_cmp expect actualetc.