tor-android/external/badvpn_dns/ncd/tests/concat.ncd

20 lines
370 B
Plaintext
Raw Normal View History

2015-01-25 11:08:34 +00:00
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");
}