1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
### Parsing Tests
# This profile isn't intended as a useful profile.
# It is a test of the rules parser.
# Run this test with:
# midiminder check test.rules
# The comments on each line tell the check command for what to expect.
# hi there # PASS indented comment
* --> test # PASS
*x --> test # FAIL something after the *
"test client" --> test # PASS
"test client --> test # FAIL no closing quote
'test client' --> test # PASS
test'client --> test # PASS internal apostrophe
'test client --> test # FAIL no closing quote
"test:ing" --> test # PASS colon inside quotes
'test:ing' --> test # PASS colon inside quotes
"test:ing":thing --> test # PASS colon inside quotes
'test:ing':thing --> test # PASS colon inside quotes
test:"abc:def" --> test # PASS colon inside quotes
test:'abc:def' --> test # PASS colon inside quotes
test:abc:def --> test # FAIL extra colon
test two --> test # PASS
test three --> test # PASS indented
test:* --> thing # PASS
test:*3 --> thing # FAIL something after the *
test:"time port" --> thing # PASS
test:"time port --> thing # FAIL no closing quote
test:'time port' --> thing # PASS
test:time'port --> thing # PASS internal apostrophe
test:'time port --> thing # FAIL no closing quote
test:time --> thing # PASS
test:time two --> thing # PASS
:: --> thing # FAIL too many colons
::: --> thing # FAIL too many colons
:34 --> thing # FAIL no client
this-->that # FAIL missing spaces
this--> that # FAIL missing spaces
this -->that # FAIL missing spaces
this -> that # PASS
this <-> that # PASS
this <- that # PASS
this <-- that # PASS
this <--- that # PASS
this <<-- that # FAIL too many angles
this ---> that # PASS
this -->> that # FAIL too many angles
this < that # FAIL no arrow
this > that # FAIL no arrow
# this > that # PASS because in a comment
.hw <-> test # PASS
.app <-> test # PASS
.blob <-> test # FAIL bad category
thing:.app <-> test # FAIL bad port, not a category
*:.app <-> test # FAIL bad wildcard, not a categroy
.app:moo <-> test # FAIL bad category, no port allowed
this 2.0 --> that # PASS internal period
this 2.0:out --> that # PASS period in client with port
"this 2.0":out --> that # PASS period in quotes
this:p3.3 --> that # PASS period in port
this:"p3.3" --> that # PASS period in port in quotes
this -x-> * # PASS
this <-x- * # PASS
this <-x-> that # PASS
this --x--> * # PASS
test:3 --> that # PASS partial name match against '3'
test:=3 --> that # PASS ALSA id match against 3
test:=three --> that # FAIL bad number
42:3 --> that # FAIL id matches not allowed in rules
|