badvpn/ncd/tests/concat.ncd
2012-08-06 23:27:08 +00:00

20 lines
370 B
Plaintext

process main {
concat("Hello", "", "World") x;
strcmp(x, "HelloWorld") a;
assert(a);
concat("\x00\x00", "\x00") x;
strcmp(x, "\x00\x00\x00") a;
assert(a);
concatv({"Hello", "", "World"}) x;
strcmp(x, "HelloWorld") a;
assert(a);
concatv({"\x00\x00", "\x00"}) x;
strcmp(x, "\x00\x00\x00") a;
assert(a);
exit("0");
}