Skip to content

Commit d09f82a

Browse files
committed
Add new test case that does some simple string operations
1 parent 2ee8d6c commit d09f82a

File tree

3 files changed

+73
-0
lines changed

3 files changed

+73
-0
lines changed
3.26 KB
Binary file not shown.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// TW Snapshot
2+
// Input SHA-256: e6a6f5ea252886949eab2f4b5608526dc3686160d65f6e07c2d864c82db24326
3+
4+
// Sprite1 script
5+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
6+
const b0 = runtime.getOpcodeFunction("looks_say");
7+
const b1 = stage.variables["PJl9-2GypE.OstQk*B_*"];
8+
return function* genXYZ () {
9+
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null);
10+
thread.procedures["Wa"]();
11+
if ((b1.value.toLowerCase() === "babab".toLowerCase())) {
12+
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "s", null);
13+
}
14+
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "q", null);
15+
retire(); return;
16+
}; })
17+
18+
// Sprite1 Wa
19+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
20+
const b0 = stage.variables["uEt-Ix{%|r3`}-W%+kdm"];
21+
const b1 = stage.variables["PJl9-2GypE.OstQk*B_*"];
22+
const b2 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
23+
return function funXYZ_a () {
24+
b0.value = "ababa";
25+
b1.value = "";
26+
b2.value = 1;
27+
for (var a0 = ("" + b0.value).length; a0 >= 0.5; a0--) {
28+
if ((((("" + b0.value))[(b2.value | 0) - 1] || "").toLowerCase() === "a".toLowerCase())) {
29+
b1.value = (("" + b1.value) + "b");
30+
} else {
31+
b1.value = (("" + b1.value) + "a");
32+
}
33+
b2.value = (b2.value + 1);
34+
}
35+
return "";
36+
}; })
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// TW Snapshot
2+
// Input SHA-256: e6a6f5ea252886949eab2f4b5608526dc3686160d65f6e07c2d864c82db24326
3+
4+
// Sprite1 script
5+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
6+
const b0 = runtime.getOpcodeFunction("looks_say");
7+
const b1 = stage.variables["PJl9-2GypE.OstQk*B_*"];
8+
return function* genXYZ () {
9+
yield* executeInCompatibilityLayer({"MESSAGE":"plan 1",}, b0, false, false, "d", null);
10+
yield* thread.procedures["Wa"]();
11+
if ((("" + b1.value).toLowerCase() === "babab".toLowerCase())) {
12+
yield* executeInCompatibilityLayer({"MESSAGE":"pass",}, b0, false, false, "s", null);
13+
}
14+
yield* executeInCompatibilityLayer({"MESSAGE":"end",}, b0, false, false, "q", null);
15+
retire(); return;
16+
}; })
17+
18+
// Sprite1 Wa
19+
(function factoryXYZ(thread) { const target = thread.target; const runtime = target.runtime; const stage = runtime.getTargetForStage();
20+
const b0 = stage.variables["uEt-Ix{%|r3`}-W%+kdm"];
21+
const b1 = stage.variables["PJl9-2GypE.OstQk*B_*"];
22+
const b2 = stage.variables["`jEk@4|i[#Fk?(8x)AV.-my variable"];
23+
return function* genXYZ_a () {
24+
b0.value = "ababa";
25+
b1.value = "";
26+
b2.value = 1;
27+
for (var a0 = ("" + b0.value).length; a0 >= 0.5; a0--) {
28+
if ((((("" + b0.value))[((+b2.value) | 0) - 1] || "").toLowerCase() === "a".toLowerCase())) {
29+
b1.value = (("" + b1.value) + "b");
30+
} else {
31+
b1.value = (("" + b1.value) + "a");
32+
}
33+
b2.value = ((+b2.value || 0) + 1);
34+
if (isStuck()) yield;
35+
}
36+
return "";
37+
}; })

0 commit comments

Comments
 (0)