From d199b61d814651e43e39ecb4b5c9c35c1c279185 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lu=C3=ADs=20Ferreira?= Date: Mon, 14 Feb 2022 09:14:07 +0000 Subject: [PATCH] test: make testsuite conform with POSIX 3.206 (#13639) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Luís Ferreira --- .gitattributes | 3 +++ test/compilable/extra-files/makedeps-import.txt | 2 +- test/compilable/makedeps_exe.d | 2 +- test/compilable/makedeps_file.d | 2 +- test/compilable/makedeps_lib.d | 2 +- test/compilable/makedeps_obj.d | 2 +- test/fail_compilation/extra-files/makedeps-import.txt | 2 +- test/fail_compilation/makedeps_doubleparam.d | 2 +- test/fail_compilation/makedeps_nofile.d | 2 +- test/fail_compilation/makedeps_wrongflag.d | 2 +- test/runnable/a20.d | 1 - test/runnable/cov2.d | 1 - test/runnable/extra-files/runnable-a20.lst | 1 - test/runnable/extra-files/runnable-cov2.lst | 1 - 14 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..9fb71abfb6 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +# The following text files requires strict end of line rules +test/compilable/extra-files/makedeps-import.txt text eol=lf +test/fail_compilation/extra-files/makedeps-import.txt text eol=lf diff --git a/test/compilable/extra-files/makedeps-import.txt b/test/compilable/extra-files/makedeps-import.txt index 2e22d4e419..5e465e1e18 100644 --- a/test/compilable/extra-files/makedeps-import.txt +++ b/test/compilable/extra-files/makedeps-import.txt @@ -1 +1 @@ -Imported text \ No newline at end of file +Imported text diff --git a/test/compilable/makedeps_exe.d b/test/compilable/makedeps_exe.d index a5bd606b6f..de17460a53 100644 --- a/test/compilable/makedeps_exe.d +++ b/test/compilable/makedeps_exe.d @@ -18,7 +18,7 @@ import imports.makedeps_a; // Test import expression enum text = import("makedeps-import.txt"); -static assert(text == "Imported text"); +static assert(text == "Imported text\x0a"); void main() { diff --git a/test/compilable/makedeps_file.d b/test/compilable/makedeps_file.d index 9dbe2695da..ead97c2d1d 100644 --- a/test/compilable/makedeps_file.d +++ b/test/compilable/makedeps_file.d @@ -26,7 +26,7 @@ enum selection = selectImport(false); // Test CTFE import expression enum text = import(selection); -static assert(text == "Imported text"); +static assert(text == "Imported text\x0a"); void func() { diff --git a/test/compilable/makedeps_lib.d b/test/compilable/makedeps_lib.d index d9b6efb9fc..fc8d5140ba 100644 --- a/test/compilable/makedeps_lib.d +++ b/test/compilable/makedeps_lib.d @@ -19,7 +19,7 @@ import imports.makedeps_a; // Test import expression enum text = import("makedeps-import.txt"); -static assert(text == "Imported text"); +static assert(text == "Imported text\x0a"); void func() { diff --git a/test/compilable/makedeps_obj.d b/test/compilable/makedeps_obj.d index 2ead2138b2..d121d02535 100644 --- a/test/compilable/makedeps_obj.d +++ b/test/compilable/makedeps_obj.d @@ -18,7 +18,7 @@ import imports.makedeps_a; // Test mixin import expression enum text = import("makedeps-import-codemixin.txt"); mixin(text); -static assert(text2 == "Imported text"); +static assert(text2 == "Imported text\x0a"); void func() { diff --git a/test/fail_compilation/extra-files/makedeps-import.txt b/test/fail_compilation/extra-files/makedeps-import.txt index 2e22d4e419..5e465e1e18 100644 --- a/test/fail_compilation/extra-files/makedeps-import.txt +++ b/test/fail_compilation/extra-files/makedeps-import.txt @@ -1 +1 @@ -Imported text \ No newline at end of file +Imported text diff --git a/test/fail_compilation/makedeps_doubleparam.d b/test/fail_compilation/makedeps_doubleparam.d index 710d652841..3e55e72977 100644 --- a/test/fail_compilation/makedeps_doubleparam.d +++ b/test/fail_compilation/makedeps_doubleparam.d @@ -15,7 +15,7 @@ import makedeps_a; // Test import expression enum text = import("makedeps-import.txt"); -static assert(text == "Imported text"); +static assert(text == "Imported text\x0a"); void main() { diff --git a/test/fail_compilation/makedeps_nofile.d b/test/fail_compilation/makedeps_nofile.d index 914ba77bcb..bfc24c8c35 100644 --- a/test/fail_compilation/makedeps_nofile.d +++ b/test/fail_compilation/makedeps_nofile.d @@ -15,7 +15,7 @@ import makedeps_a; // Test import expression enum text = import("makedeps-import.txt"); -static assert(text == "Imported text"); +static assert(text == "Imported text\x0a"); void main() { diff --git a/test/fail_compilation/makedeps_wrongflag.d b/test/fail_compilation/makedeps_wrongflag.d index 0e0237f27c..a779218008 100644 --- a/test/fail_compilation/makedeps_wrongflag.d +++ b/test/fail_compilation/makedeps_wrongflag.d @@ -15,7 +15,7 @@ import makedeps_a; // Test import expression enum text = import("makedeps-import.txt"); -static assert(text == "Imported text"); +static assert(text == "Imported text\x0a"); void main() { diff --git a/test/runnable/a20.d b/test/runnable/a20.d index cedfb094d0..53417a551b 100644 --- a/test/runnable/a20.d +++ b/test/runnable/a20.d @@ -12,4 +12,3 @@ void main(string[] args) { dmd_coverDestPath(args[1]); } - diff --git a/test/runnable/cov2.d b/test/runnable/cov2.d index dbac103f5d..875fb3a324 100644 --- a/test/runnable/cov2.d +++ b/test/runnable/cov2.d @@ -59,4 +59,3 @@ int main(string[] args) test3(); return 0; } - diff --git a/test/runnable/extra-files/runnable-a20.lst b/test/runnable/extra-files/runnable-a20.lst index 5316229652..98f63a6d5f 100644 --- a/test/runnable/extra-files/runnable-a20.lst +++ b/test/runnable/extra-files/runnable-a20.lst @@ -12,4 +12,3 @@ |{ 1| dmd_coverDestPath(args[1]); |} - | diff --git a/test/runnable/extra-files/runnable-cov2.lst b/test/runnable/extra-files/runnable-cov2.lst index 1199e53e85..5f3a089817 100644 --- a/test/runnable/extra-files/runnable-cov2.lst +++ b/test/runnable/extra-files/runnable-cov2.lst @@ -59,4 +59,3 @@ 1| test3(); 1| return 0; |} - |