From 0e1a28e47753f2b4b4d299fa0b3c3ac80c05dc76 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Mon, 30 Sep 2019 19:08:53 +0300 Subject: Add support for $string.icasecmp() --- tests/function/string/testscript | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/function/string/testscript (limited to 'tests/function/string/testscript') diff --git a/tests/function/string/testscript b/tests/function/string/testscript new file mode 100644 index 0000000..296e0d1 --- /dev/null +++ b/tests/function/string/testscript @@ -0,0 +1,27 @@ +# file : tests/function/string/testscript +# copyright : Copyright (c) 2014-2019 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +.include ../../common.testscript + +: icasecmp +: +{ + : equal + : + { + $* <'print $icasecmp([string] "a", [string] "A")' >'true' : string-string + $* <'print $icasecmp([string] "a", "A")' >'true' : string-untyped + $* <'print $icasecmp("a", [string] "A")' >'true' : untyped-string + $* <'print $string.icasecmp("a", "A")' >'true' : untyped-untyped + } + + : different + : + { + $* <'print $icasecmp([string] "a", [string] "b")' >'false' : string-string + $* <'print $icasecmp([string] "a", "b")' >'false' : string-untyped + $* <'print $icasecmp("a", [string] "b")' >'false' : untyped-string + $* <'print $string.icasecmp("a", "b")' >'false' : untyped-untyped + } +} -- cgit v1.1