diff options
Diffstat (limited to 'tests/methods/bug723195.vala')
-rw-r--r-- | tests/methods/bug723195.vala | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/methods/bug723195.vala b/tests/methods/bug723195.vala new file mode 100644 index 000000000..1ea599046 --- /dev/null +++ b/tests/methods/bug723195.vala @@ -0,0 +1,25 @@ +private static int main (string[] args) { + string[] a = { "foo", "bar", null, "baz" }; + + a.length = 0; + assert (string.joinv (":", a) == ""); + + a.length = 1; + assert (string.joinv (":", a) == "foo"); + + a.length = 2; + assert (string.joinv (":", a) == "foo:bar"); + + a.length = 3; + assert (string.joinv (":", a) == "foo:bar:"); + + a.length = 4; + assert (string.joinv (":", a) == "foo:bar::baz"); + + a.length = -1; + assert (string.joinv (":", a) == "foo:bar"); + + assert (string.joinv (":", null) == ""); + + return 0; +} |