Error Message :
N/A
The
STR_MATCH function delivers inconsistent results in early version 11. The behavior has been duplicated in version 11.2.2, but not 11.2.3 or above.
Investigation The following snippets show the behavior and how to test if you are affected.
Setup test values
:set &string# = "asdf"
:set &string# = str_trim(&string#)
:set &empty# = ""
:print "string -&string#-"
:print "empty -&empty#-"
All three matches should result in N
:set &match1# = str_match(&string#, &empty#)
:print "match1 &match1#"
:set &match2# = str_match(&string#, "")
:print "match2 &match2#"
:set &match3# = str_match(&string#, &empty#)
:print "match3 &match3#"
Actual Results:One match results in Y.
U00020408 string -asdf-
U00020408 empty --
U00020408 match1 Y
U00020408 match2 N
U00020408 match3 N
Expected Results: All three matches should return N.
U00020408 string -asdf-
U00020408 empty --
U00020408 match1 N
U00020408 match2 N
U00020408 match3 N