t9300 (fast-import): style tweaks
Clarify dependencies between tests to make the fast-import test
script more approachable. In particular:
- guard setup commands with test assertions (for robustness and to
make it easier to identify where each test starts and ends);
- mention "setup" in the descriptions of tests that are used to
prepare for later ones;
- avoid hard-coded object names. Although compare_diff_raw means
most of them do not affect the test result, the reader can
benefit more from other object descriptions;
- tweak whitespace style: each test now starts with a test assertion,
description, and opening quote on a single line, followed by test
code that checks a single claim;
While at it:
- introduce a verify_packs() helper, avoiding some repetition;
- use test_cmp instead of test $foo = $bar for nicer output with -v;
- use multiple separate commands instead of pipelines when that
helps debugability;
- use $(...) command substitutions in preference to ``; the former
are less error-prone with respect to quoting and easier to notice
when looking for $variable interpolations.
- do not let tests exit the entire test script when they fail.
Cc: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>