aboutsummaryrefslogtreecommitdiff
path: root/test cases
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-03-12 09:36:45 +0000
committerTim-Philipp Müller <tim@centricular.com>2016-03-12 14:15:31 +0000
commit02e84df0105fb50ab82441b7ec64de149d23b7f9 (patch)
tree581b55d339a167f8dba3c493798624ba1458a73a /test cases
parent79537b54dbdaf467e425f6337d1c1566c4ccf26b (diff)
downloadmeson-02e84df0105fb50ab82441b7ec64de149d23b7f9.zip
meson-02e84df0105fb50ab82441b7ec64de149d23b7f9.tar.gz
meson-02e84df0105fb50ab82441b7ec64de149d23b7f9.tar.bz2
Add more string functions: contains(), to_upper() and to_lower()
Diffstat (limited to 'test cases')
-rw-r--r--test cases/common/42 string formatting/meson.build24
1 files changed, 24 insertions, 0 deletions
diff --git a/test cases/common/42 string formatting/meson.build b/test cases/common/42 string formatting/meson.build
index 39737f7..ea785e8 100644
--- a/test cases/common/42 string formatting/meson.build
+++ b/test cases/common/42 string formatting/meson.build
@@ -41,4 +41,28 @@ if long.endswith(prefix)
error('Not suffix.')
endif
+if not long.contains(prefix)
+ error('Does not contain prefix')
+endif
+
+if not long.contains(suffix)
+ error('Does not contain suffix')
+endif
+
+if not long.contains('bcd')
+ error('Does not contain middle part')
+endif
+
+if long.contains('dc')
+ error('Broken contains')
+endif
+
+if long.to_upper() != 'ABCDE'
+ error('Broken to_upper')
+endif
+
+if long.to_upper().to_lower() != long
+ error('Broken to_lower')
+endif
+
assert('3'.to_int() == 3, 'String int conversion does not work.')