Skip to content

Commit

Permalink
t0021-conversion.sh: Test that the clean filter really cleans content.
Browse files Browse the repository at this point in the history
This test uses a rot13 filter, which is its own inverse. It tested only
that the content was the same as the original after both the 'clean' and
the 'smudge' filter were applied. This way it would not detect whether
any filter was run at all. Hence, here we add another test that checks
that the repository contained content that was processed by the 'clean'
filter.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
  • Loading branch information
Johannes Sixt authored and Shawn O. Pearce committed Oct 21, 2007
1 parent 21edd3f commit a0ae35a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion t/t0021-conversion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ test_expect_success check '
git diff --raw --exit-code :test :test.i &&
id=$(git rev-parse --verify :test) &&
embedded=$(sed -ne "$script" test.i) &&
test "z$id" = "z$embedded"
test "z$id" = "z$embedded" &&
git cat-file blob :test.t > test.r &&
./rot13.sh < test.o > test.t &&
cmp test.r test.t
'

# If an expanded ident ever gets into the repository, we want to make sure that
Expand Down

0 comments on commit a0ae35a

Please sign in to comment.