File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -544,17 +544,21 @@ def check_command(c, cache):
544544 cerr = ""
545545 if c .cmd in ['has' , 'hasraw' , 'matches' , 'matchesraw' ]: # string test
546546 regexp = c .cmd .startswith ('matches' )
547- if len (c .args ) == 1 and not regexp and 'raw' not in c .cmd : # @has <path> = file existence
547+
548+ # @has <path> = file existence
549+ if len (c .args ) == 1 and not regexp and 'raw' not in c .cmd :
548550 try :
549551 cache .get_file (c .args [0 ])
550552 ret = True
551553 except FailedCheck as err :
552554 cerr = str (err )
553555 ret = False
554- elif len (c .args ) == 2 and 'raw' in c .cmd : # @hasraw/matchesraw <path> <pat> = string test
556+ # @hasraw/matchesraw <path> <pat> = string test
557+ elif len (c .args ) == 2 and 'raw' in c .cmd :
555558 cerr = "`PATTERN` did not match"
556559 ret = check_string (cache .get_file (c .args [0 ]), c .args [1 ], regexp )
557- elif len (c .args ) == 3 and 'raw' not in c .cmd : # @has/matches <path> <pat> <match> = XML tree test
560+ # @has/matches <path> <pat> <match> = XML tree test
561+ elif len (c .args ) == 3 and 'raw' not in c .cmd :
558562 cerr = "`XPATH PATTERN` did not match"
559563 ret = get_nb_matching_elements (cache , c , regexp , True ) != 0
560564 else :
You can’t perform that action at this time.
0 commit comments