Skip to content

Commit

Permalink
Adds tests for PR#28.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Cuthbertson committed Apr 4, 2016
1 parent b44c368 commit aa5181b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/lua/lib-string.lua
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,6 @@ end




-- gsub

a = '<%?xml version="1.0" encoding="UTF%-8"%?>'
Expand Down Expand Up @@ -514,6 +513,9 @@ assertTrue (d == ':X:X:X:X:X:', 'string.gsub() should replace the matched part o
c = string.gsub (';a;', 'a*', 'ITEM')
assertTrue (c == 'ITEM;ITEMITEM;ITEM', 'string.gsub() should replace the matched part of the string[2]')

a = 'abc\\def'
b = string.gsub(a, '\\', '\\\\')
assertEqual (b, 'abc\\\\def', 'Allow backslashes in regexes')



Expand Down
1 change: 1 addition & 0 deletions test/lua/operators.lua
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,5 @@ for name, test in pairs(tests) do

end

assertTrue('abc' < 'def', 'Strings should be comparable')

0 comments on commit aa5181b

Please sign in to comment.