Skip to content

Commit

Permalink
Merge pull request #164 from CyberShadow/pull-20150308-062031
Browse files Browse the repository at this point in the history
fix Issue 14259 - rdmd: --build-only / -of / -od incompatible with --dry-run
  • Loading branch information
DmitryOlshansky committed Jun 15, 2015
2 parents 3c061ba + 3ff5be6 commit 25e55ff
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion rdmd.d
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ int main(string[] args)
if (buildWitness != exe)
{
yap("touch ", buildWitness);
std.file.write(buildWitness, "");
if (!dryRun)
std.file.write(buildWitness, "");
}
}

Expand Down
3 changes: 3 additions & 0 deletions rdmd_test.d
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ void runTests()
assert(res.status == 0, res.output); // static assert(0) not called since we did not build.
assert(res.output.canFind("mkdirRecurse "), res.output); // --dry-run implies chatty

res = execute([rdmdApp, compilerSwitch, "--force", "--dry-run", "--build-only", failComptime]);
assert(res.status == 0, res.output); // --build-only should not interfere with --dry-run

/* Test --eval. */
res = execute([rdmdApp, compilerSwitch, "--force", "--eval=writeln(`eval_works`);"]);
assert(res.status == 0, res.output);
Expand Down

0 comments on commit 25e55ff

Please sign in to comment.