forked from myint/language-check
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.bash
More file actions
executable file
·24 lines (17 loc) · 749 Bytes
/
test.bash
File metadata and controls
executable file
·24 lines (17 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
#
# Test command-line usage.
set -ex
trap "echo -e '\x1b[01;31mFailed\x1b[0m'" ERR
echo 'This is okay.' | language-check -
! echo 'This is noot okay.' | language-check -
echo 'This is okay.' | python -m language_check -
! echo 'This is noot okay.' | python -m language_check -
echo 'These are “smart” quotes.' | python -m language_check -
! echo 'These are "dumb" quotes.' | python -m language_check -
! echo 'These are "dumb" quotes.' | python -m language_check --enabled-only \
--enable=EN_QUOTES -
echo 'These are "dumb" quotes.' | python -m language_check --enabled-only \
--enable=EN_UNPAIRED_BRACKETS -
echo '# These are "dumb".' | python -m language_check --ignore-lines='^#' -
echo -e '\x1b[01;32mOkay\x1b[0m'