summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2021-03-09 15:52:30 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2021-03-09 15:52:30 +0100
commit8f2864ab9ec914ce40aaaa8b5c15fc48f4f7908f (patch)
tree94110963c94af54b3c3277b2ae684d64cb160cbb
parent3c77546d3a97a61fb62b3984d77ac7ec3efbe7f7 (diff)
downloadvala-8f2864ab9ec914ce40aaaa8b5c15fc48f4f7908f.tar.gz
tests: Add "string concat" test for POSIX to increase coverage
-rw-r--r--tests/Makefile.am1
-rw-r--r--tests/posix/string-concat.vala8
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7718adef4..b22e19768 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1216,6 +1216,7 @@ LINUX_TESTS += \
linux/file-commandpipe.vala \
posix/arrays.vala \
posix/empty-length-0.vala \
+ posix/string-concat.vala \
posix/string-printf.vala \
posix/struct_only.vala \
posix/delegate_only.vala \
diff --git a/tests/posix/string-concat.vala b/tests/posix/string-concat.vala
new file mode 100644
index 000000000..ead6abeed
--- /dev/null
+++ b/tests/posix/string-concat.vala
@@ -0,0 +1,8 @@
+unowned string get_foo () {
+ return "foo";
+}
+
+void main () {
+ string s = get_foo () + "bar" + "!";
+ assert (s == "foobar!");
+}