From 2fb4b62b8dcbceabd9785a71cc0036a9f1464094 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 12 Mar 2024 15:07:12 +0900 Subject: [PATCH] Update testloader.js, test-misc.json --- data/test-misc.json | 5 +++++ testloader.js | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/data/test-misc.json b/data/test-misc.json index 994bf5e..9f400ec 100644 --- a/data/test-misc.json +++ b/data/test-misc.json @@ -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"] } ] } diff --git a/testloader.js b/testloader.js index 019c136..6f0a8a6 100644 --- a/testloader.js +++ b/testloader.js @@ -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); + } } };