git @ Cat's Eye Technologies T-Rext / eb1c633
Upgrade test harness to test under both Python 2 and Python 3. Chris Pressey 3 years ago
4 changed file(s) with 25 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
5555
5656 This is a test suite, written in [Falderal][] format, for the `t-rext`
5757 utility. It also serves as documentation for said utility.
58
59 -> Functionality "Clean up punctuation and spaces" is implemented by
60 -> shell command "bin/t-rext %(test-body-file)"
6158
6259 -> Tests for functionality "Clean up punctuation and spaces"
6360
0 -> Functionality "Clean up punctuation and spaces" is implemented by
1 -> shell command "python2 bin/t-rext %(test-body-file)"
0 -> Functionality "Clean up punctuation and spaces" is implemented by
1 -> shell command "python3 bin/t-rext %(test-body-file)"
00 #!/bin/sh
11
2 falderal README.md
2 APPLIANCES=""
3 MISSING=""
4
5 if command -v python2 > /dev/null 2>&1; then
6 APPLIANCES="$APPLIANCES appliances/t-rext.py2.md"
7 else
8 MISSING="${MISSING}2"
9 fi
10
11 if command -v python3 > /dev/null 2>&1; then
12 APPLIANCES="$APPLIANCES appliances/t-rext.py3.md"
13 else
14 MISSING="${MISSING}3"
15 fi
16
17 if [ "x${MISSING}" = "x23" ]; then
18 echo "Neither python2 nor python3 found on executable search path. Aborting."
19 exit 1
20 fi
21
22 falderal $APPLIANCES README.md || exit 1