Skip to content

Commit a834fb9

Browse files
committed
since the trim functions behave now differently in case of undefined argument (they return now empty string instead of undefined value) they also have be tested for that
1 parent 8a6d3da commit a834fb9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/resources/com/scriptbasic/testprograms/TestStringFunctions.bas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ assert("trim", trim(v)="1234")
1010
assert("rtrim", rtrim(v)=" 1234")
1111

1212
' Test null values
13-
assert("ltrim_with_null", IsNull(ltrim(undefined_var)))
14-
assert("trim_with_null", IsNull(trim(undefined_var)))
15-
assert("rtrim_with_null", IsNull(rtrim(undefined_var)))
13+
assert("ltrim_with_null", "" = ltrim(undefined_var))
14+
assert("trim_with_null", "" = trim(undefined_var))
15+
assert("rtrim_with_null", "" = rtrim(undefined_var))
1616

1717
' Test left, mid, right functions
1818
v = 1234

0 commit comments

Comments
 (0)