diff options
author | Mu Qiao <qiaomuf@gentoo.org> | 2011-06-16 16:58:36 +0800 |
---|---|---|
committer | Mu Qiao <qiaomuf@gentoo.org> | 2011-06-16 16:58:36 +0800 |
commit | 63ba78213c1ed411fedf92d99c44fd827871af3b (patch) | |
tree | f8e7393d6ff5202042e342ecc991a194423e5dfa /bashast/gunit | |
parent | Parser: support escaped characters in double quotes (diff) | |
download | libbash-63ba78213c1ed411fedf92d99c44fd827871af3b.tar.gz libbash-63ba78213c1ed411fedf92d99c44fd827871af3b.tar.bz2 libbash-63ba78213c1ed411fedf92d99c44fd827871af3b.zip |
Parser: support regular expression in keyword test
Diffstat (limited to 'bashast/gunit')
-rw-r--r-- | bashast/gunit/cond_main.gunit | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/bashast/gunit/cond_main.gunit b/bashast/gunit/cond_main.gunit index eeef052..2c1eee7 100644 --- a/bashast/gunit/cond_main.gunit +++ b/bashast/gunit/cond_main.gunit @@ -30,3 +30,4 @@ cond_expr: "[ a = b ]" -> (BUILTIN_TEST (= (STRING a) (STRING b))) "[ a == b ]" -> (BUILTIN_TEST (= (STRING a) (STRING b))) "[ a != b ]" -> (BUILTIN_TEST (NOT_EQUALS (STRING a) (STRING b))) +"[[ \"${DISTUTILS_SRC_TEST}\" =~ ^(setup\.py|nosetests|py\.test|trial(\ .*)?)$ ]]" -> (KEYWORD_TEST (MATCH_REGULAR_EXPRESSION (STRING (DOUBLE_QUOTED_STRING (VAR_REF DISTUTILS_SRC_TEST))) (STRING ^ ( setup \ . py | nosetests | py \ . test | trial ( \ . * ) ? ) $))) |