Skip to content

Commit dd4b40f

Browse files
author
Wolfram Rösler
committed
test_doc.sh: Use two digits to number test blocks
Before, blocks would be tested in alphabetical order (1, 11, ..., 19, 2, 20, ...) Now they are tested in numerical order (01, 02, ..., 09, 10, ...)
1 parent dd74582 commit dd4b40f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_doc.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ LANG=C.UTF-8
66

77
export FORCE_COLOR=false
88
export STICK_TO_CWD=true
9-
BASH_UNIT="eval ./bash_unit"
9+
BASH_UNIT="eval ./bash_unit -o"
1010
#BASH_UNIT="eval FORCE_COLOR=false ./bash_unit"
1111

1212
prepare_tests() {
@@ -20,10 +20,10 @@ prepare_tests() {
2020

2121
while grep -E '^'"$TEST_PATTERN"'$' $remaining >/dev/null
2222
do
23-
block=$(($block+1))
23+
((++block))
2424
run_doc_test $remaining $swap |& sed '$a\' > $test_output$block
2525
doc_to_output $remaining $swap > $expected_output$block
26-
eval 'function test_block_'"$block"'() {
26+
eval 'function test_block_'"$(printf %02d $block)"'() {
2727
assert "diff -u '"$expected_output$block"' '"$test_output$block"'"
2828
}'
2929
done

0 commit comments

Comments
 (0)