Skip to content

Commit

Permalink
[try fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Dec 17, 2023
1 parent 1a226bb commit da9cea9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,15 @@ $(ROOT)/tests_extractor$(DOTEXE): tests_extractor.d
# Build & run tests
################################################################################

# diff's `--strip-trailing-cr` isn't enough for some reason
DOS2UNIX:=$(if $(findstring windows,$(OS)),| dos2unix,)

test_tests_extractor: $(ROOT)/tests_extractor$(DOTEXE)
for file in ascii iteration ; do \
$< -i "./test/tests_extractor/$${file}.d" | diff -u --strip-trailing-cr -p - "./test/tests_extractor/$${file}.d.ext"; \
$< -i "./test/tests_extractor/$${file}.d" $(DOS2UNIX) | diff -u --strip-trailing-cr -p - "./test/tests_extractor/$${file}.d.ext"; \
done
$< -a betterc -i "./test/tests_extractor/attributes.d" | diff -u --strip-trailing-cr -p - "./test/tests_extractor/attributes.d.ext";
$< --betterC -i "./test/tests_extractor/betterc.d" | diff -u --strip-trailing-cr -p - "./test/tests_extractor/betterc.d.ext";
$< -a betterc -i "./test/tests_extractor/attributes.d" $(DOS2UNIX) | diff -u --strip-trailing-cr -p - "./test/tests_extractor/attributes.d.ext";
$< --betterC -i "./test/tests_extractor/betterc.d" $(DOS2UNIX) | diff -u --strip-trailing-cr -p - "./test/tests_extractor/betterc.d.ext";

RDMD_TEST_COMPILERS = $(DMD)
RDMD_TEST_EXECUTABLE = $(ROOT)/rdmd$(DOTEXE)
Expand Down
2 changes: 1 addition & 1 deletion rdmd_test.d
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ void runFallbackTest(string rdmdApp, string buildCompiler, string model)
if an explicit --compiler flag is not provided, rdmd should
search its own binary path first when looking for the default
compiler (determined by the compiler used to build it) */
string localDMD = buildPath(tempDir(), baseName(buildCompiler).setExtension(binExt));
string localDMD = buildPath(dirName(rdmdApp), baseName(buildCompiler).setExtension(binExt)).absolutePath;
std.file.write(localDMD, ""); // An empty file avoids the "Not a valid 16-bit application" pop-up on Windows
scope(exit) std.file.remove(localDMD);

Expand Down

0 comments on commit da9cea9

Please sign in to comment.