Update testloader.js, test-misc.json

This commit is contained in:
Namhyeon Go 2024-03-12 15:07:12 +09:00
parent 51ef1508bd
commit 2fb4b62b8d
2 changed files with 22 additions and 0 deletions

View File

@ -68,6 +68,11 @@
"id": "sharedmemory_listener",
"description": "Read a text from the (named) shared memory, Repeatly",
"tags": ["Windows System", "IPC(Inter-Process Communication)"]
},
{
"id": "string_split",
"description": "String.split test",
"tags": ["Assertion"]
}
]
}

View File

@ -917,6 +917,23 @@ var test_implements = {
sleep(100);
}
}
},
"string_split": function() {
var a = "monkey:red:apple:delicious:banana:long:train:fast:airplane:high:everest:sharp:seringue:painful";
var b = a.split(':').join(':');
var c = "a=1=b=2=c=3";
var d = c.split('=').join('=');
if (a == b && c == d) {
console.log("PASS");
} else {
console.log("FAILED");
console.log(a);
console.log(b);
console.log(c);
console.log(d);
}
}
};