Debian Codegraph @

testing/tests/canonifier-cmdline.test

raw
1 # Verify that btest-diff returns nonzero when a file differs from the baseline
2 # when a canonifier is applied. Two types of canonifiers are tested: one that
3 # reads input only from stdin, and one that ignores stdin when a filename is
4 # provided as a cmd-line argument.
5 # %TEST-EXEC: chmod +x ignore-cmdline-args
6 # %TEST-EXEC: btest -d %INPUT
7
8 %TEST-START-FILE Baseline/canonifier-cmdline/output
9 ABC 123 DEF
10 %TEST-END-FILE
11
12 %TEST-START-FILE ignore-cmdline-args
13 sed 's/[0-9][0-9][0-9]/XXX/'
14 %TEST-END-FILE
15
16 @TEST-EXEC: echo ABC DEF >output
17 @TEST-EXEC-FAIL: TEST_DIFF_CANONIFIER="../../ignore-cmdline-args" btest-diff output
18 @TEST-EXEC-FAIL: TEST_DIFF_CANONIFIER="sed 's/[0-9][0-9][0-9]/XXX/'" btest-diff output