summaryrefslogtreecommitdiff
path: root/tests/test-suite/pm-gsub.lua
diff options
context:
space:
mode:
authordaurnimator <quae@daurnimator.com>2018-04-20 21:16:24 +1000
committerdaurnimator <quae@daurnimator.com>2018-04-20 21:16:24 +1000
commita260f381d30e036b39078fee0295e539067c10a3 (patch)
tree4f3b2ecb264ec8dd29cac74d23223d15d297eb8e /tests/test-suite/pm-gsub.lua
parentfe9b43374c2e8dc28df0ce460aefaf50b933aaa7 (diff)
parent9f5d4d35de0b88334bba7c11a9e960a19ee0740b (diff)
downloadfengari-a260f381d30e036b39078fee0295e539067c10a3.tar.gz
fengari-a260f381d30e036b39078fee0295e539067c10a3.tar.bz2
fengari-a260f381d30e036b39078fee0295e539067c10a3.zip
Merge branch 'test-with-jest'
Diffstat (limited to 'tests/test-suite/pm-gsub.lua')
-rw-r--r--tests/test-suite/pm-gsub.lua17
1 files changed, 0 insertions, 17 deletions
diff --git a/tests/test-suite/pm-gsub.lua b/tests/test-suite/pm-gsub.lua
deleted file mode 100644
index d873cce..0000000
--- a/tests/test-suite/pm-gsub.lua
+++ /dev/null
@@ -1,17 +0,0 @@
-assert(string.gsub('ülo ülo', 'ü', 'x') == 'xlo xlo')
-assert(string.gsub('alo úlo ', ' +$', '') == 'alo úlo') -- trim
-assert(string.gsub(' alo alo ', '^%s*(.-)%s*$', '%1') == 'alo alo') -- double trim
-assert(string.gsub('alo alo \n 123\n ', '%s+', ' ') == 'alo alo 123 ')
-t = "abç d"
-a, b = string.gsub(t, '(.)', '%1@')
-assert('@'..a == string.gsub(t, '', '@') and b == 5)
-a, b = string.gsub('abçd', '(.)', '%0@', 2)
-assert(a == 'a@b@çd' and b == 2)
-assert(string.gsub('alo alo', '()[al]', '%1') == '12o 56o')
-assert(string.gsub("abc=xyz", "(%w*)(%p)(%w+)", "%3%2%1-%0") ==
- "xyz=abc-abc=xyz")
-assert(string.gsub("abc", "%w", "%1%0") == "aabbcc")
-assert(string.gsub("abc", "%w+", "%0%1") == "abcabc")
-assert(string.gsub('áéí', '$', '\0óú') == 'áéí\0óú')
-assert(string.gsub('', '^', 'r') == 'r')
-assert(string.gsub('', '$', 'r') == 'r')