Skip to content

Commit 5cc9864

Browse files
authored
Merge pull request #318 from wilzbach/partially-revert-303
Partially revert #303 until #317 is resolved merged-on-behalf-of: Sebastian Wilzbach <[email protected]>
2 parents 8df8eb7 + 6a1b3fb commit 5cc9864

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

rdmd.d

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -831,23 +831,26 @@ string innerEvalCode(string[] eval)
831831
import std.string : join, stripRight;
832832
// assumeSafeAppend just to avoid unnecessary reallocation
833833
string code = eval.join("\n").stripRight.assumeSafeAppend;
834-
if (code.length > 0 && code[$ - 1] != ';')
835-
code ~= ';';
834+
// Revert https://github.com/dlang/tools/pull/303 until
835+
// https://github.com/dlang/tools/pull/317 has been resolved
836+
//if (code.length > 0 && code[$ - 1] != ';')
837+
//code ~= ';';
836838
return code;
837839
}
838840

841+
// partially reverted until https://github.com/dlang/tools/pull/317 is resolved
839842
unittest
840843
{
841-
assert(innerEvalCode([`writeln("Hello!")`]) == `writeln("Hello!");`);
844+
//assert(innerEvalCode([`writeln("Hello!")`]) == `writeln("Hello!");`);
842845
assert(innerEvalCode([`writeln("Hello!");`]) == `writeln("Hello!");`);
843846

844847
// test with trailing whitespace
845-
assert(innerEvalCode([`writeln("Hello!") `]) == `writeln("Hello!");`);
848+
//assert(innerEvalCode([`writeln("Hello!") `]) == `writeln("Hello!");`);
846849
assert(innerEvalCode([`writeln("Hello!"); `]) == `writeln("Hello!");`);
847850

848851
// test with multiple entries
849-
assert(innerEvalCode([`writeln("Hello!"); `, `writeln("You!") `])
850-
== "writeln(\"Hello!\"); \nwriteln(\"You!\");");
852+
//assert(innerEvalCode([`writeln("Hello!"); `, `writeln("You!") `])
853+
//== "writeln(\"Hello!\"); \nwriteln(\"You!\");");
851854
assert(innerEvalCode([`writeln("Hello!"); `, `writeln("You!"); `])
852855
== "writeln(\"Hello!\"); \nwriteln(\"You!\");");
853856
}
@@ -891,10 +894,11 @@ unittest
891894
// innerEvalCode already tests the cases for different
892895
// contents in `eval` array, so let's focus on testing
893896
// the difference based on the `loop` flag
894-
assert(makeEvalCode([`writeln("Hello!") `], No.loop) ==
895-
importWorld
896-
~ "void main(char[][] args) {\n"
897-
~ "writeln(\"Hello!\");\n}");
897+
// partially reverted until https://github.com/dlang/tools/pull/317 is resolved
898+
//assert(makeEvalCode([`writeln("Hello!") `], No.loop) ==
899+
//importWorld
900+
//~ "void main(char[][] args) {\n"
901+
//~ "writeln(\"Hello!\");\n}");
898902

899903
assert(makeEvalCode([`writeln("What!"); `], No.loop) ==
900904
importWorld

0 commit comments

Comments
 (0)