|
1 | | -#!/bin/bash -ex |
| 1 | +#!/bin/bash |
2 | 2 | # |
3 | 3 | # Test command-line usage. |
4 | 4 |
|
5 | | -trap "echo -e '\x1b[01;31mFailed\x1b[0m'" ERR |
| 5 | +set -ex |
6 | 6 |
|
7 | | -#export ARGS="--remote-host localhost --remote-port 8080" |
8 | | -export ARGS="" |
| 7 | +trap "echo -e '\x1b[01;31mFailed\x1b[0m'" ERR |
9 | 8 |
|
10 | | -echo 'This is okay.' | language-check ${ARGS} - |
11 | | -! echo 'This is noot okay.' | language-check ${ARGS} - |
| 9 | +echo 'This is okay.' | language-check - |
| 10 | +! echo 'This is noot okay.' | language-check - |
12 | 11 |
|
13 | | -echo 'This is okay.' | python -m language_check ${ARGS} - |
14 | | -! echo 'This is noot okay.' | python -m language_check ${ARGS} - |
| 12 | +echo 'This is okay.' | python -m language_check - |
| 13 | +! echo 'This is noot okay.' | python -m language_check - |
15 | 14 |
|
16 | | -echo 'These are “smart” quotes.' | python -m language_check ${ARGS} - |
17 | | -! echo 'These are "dumb" quotes.' | python -m language_check ${ARGS} - |
18 | | -! echo 'These are "dumb" quotes.' | python -m language_check ${ARGS} --enabled-only \ |
| 15 | +echo 'These are “smart” quotes.' | python -m language_check - |
| 16 | +! echo 'These are "dumb" quotes.' | python -m language_check - |
| 17 | +! echo 'These are "dumb" quotes.' | python -m language_check --enabled-only \ |
19 | 18 | --enable=EN_QUOTES - |
20 | | -echo 'These are "dumb" quotes.' | python -m language_check ${ARGS} --enabled-only \ |
| 19 | +echo 'These are "dumb" quotes.' | python -m language_check --enabled-only \ |
21 | 20 | --enable=EN_UNPAIRED_BRACKETS - |
22 | 21 |
|
23 | | -echo '# These are "dumb".' | python -m language_check ${ARGS} --ignore-lines='^#' - |
| 22 | +echo '# These are "dumb".' | python -m language_check --ignore-lines='^#' - |
24 | 23 |
|
25 | 24 | echo -e '\x1b[01;32mOkay\x1b[0m' |
0 commit comments