Debian Codegraph @

testing/tests/diff-max-lines.test

raw
1 # Verify that when btest-diff fails due to a file not matching a baseline,
2 # btest-diff will not show more than the first TEST_DIFF_FILE_MAX_LINES lines
3 # of the file. However, when there is no baseline, then the entire file is
4 # shown.
5
6 # %TEST-EXEC-FAIL: btest -d %INPUT >raw 2>&1
7 # %TEST-EXEC: cat raw | grep -v '+++' | grep -v '\-\-\-' >output1
8 # %TEST-EXEC: btest-diff output1
9
10 # %TEST-EXEC: mkdir -p Baseline/diff-max-lines
11 # %TEST-EXEC: echo "This is the baseline" >Baseline/diff-max-lines/child-output
12 # %TEST-EXEC-FAIL: btest -d %INPUT >raw 2>&1
13 # %TEST-EXEC: cat raw | grep -v '+++' | grep -v '\-\-\-' >output2
14 # %TEST-EXEC: btest-diff output2
15
16 @TEST-EXEC: awk 'BEGIN{for(i=1;i<=10;i++) print "Output line",i}' >child-output
17 @TEST-EXEC: TEST_DIFF_FILE_MAX_LINES=2 btest-diff child-output