Skip to content

Commit 684e1f7

Browse files
Match "32mscoff" to "32" in conditional TEST_OUTPUT
Conditional output for 32 bit compilation seldomly depends on the object format
1 parent af988e6 commit 684e1f7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

test/tools/d_do_test.d

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ bool compareOutput(string output, string refoutput, const ref EnvData envData)
638638
break;
639639
}
640640
// Match against OS or model
641-
else if (conditional[0].among(envData.os, envData.model))
641+
else if (conditional[0].among(envData.os, envData.model, envData.model[0 .. min(2, $)]))
642642
{
643643
toSkip = conditional[2];
644644
break;
@@ -684,6 +684,9 @@ unittest
684684

685685
const emptyFmt = "On <$?:windows=abc|$> use <$?:posix=$>!";
686686
assert(compareOutput("On <> use <>!", emptyFmt, ed));
687+
688+
ed.model = "32mscoff";
689+
assert(compareOutput("size_t is uint!", "size_t is $?:32=uint|64=ulong$!", ed));
687690
}
688691

689692
string envGetRequired(in char[] name)

0 commit comments

Comments
 (0)