From 36da089ee4870eaff4fe9fc7b40d762754ce9a56 Mon Sep 17 00:00:00 2001
From: Patrick Baudin <patrick.baudin@cea.fr>
Date: Thu, 7 Jul 2022 14:45:36 +0200
Subject: [PATCH] [Tests] restore tests/spec/result/preprocess_dos

---
 .gitignore                     |  1 -
 tests/spec/preprocess_dos.c    | 13 +++++++++++++
 tests/spec/preprocess_dos.c.in | 13 -------------
 3 files changed, 13 insertions(+), 14 deletions(-)
 create mode 100644 tests/spec/preprocess_dos.c
 delete mode 100644 tests/spec/preprocess_dos.c.in

diff --git a/.gitignore b/.gitignore
index 0c9a3ffad12..636040ada80 100644
--- a/.gitignore
+++ b/.gitignore
@@ -59,7 +59,6 @@ autom4te.cache
 /tests/crowbar/mutable
 /tests/crowbar/output-*
 /tests/crowbar/test_ghost_cfg
-/tests/spec/preprocess_dos.c
 /tests/*/*.opt
 
 /devel_tools/fc-time
diff --git a/tests/spec/preprocess_dos.c b/tests/spec/preprocess_dos.c
new file mode 100644
index 00000000000..fad1137e4f4
--- /dev/null
+++ b/tests/spec/preprocess_dos.c
@@ -0,0 +1,13 @@
+/* run.config*
+DEPS: preprocess_dos.sh
+ENABLED_IF: %{bin-available:unix2dos}
+OPT: -cpp-command="./@PTEST_NAME@.sh unix2dos %i %o" -cpp-frama-c-compliant -print
+*/
+
+int main() {
+    int a = 0;
+    /*@
+        assert a == 0;
+    */
+    return a;
+}
diff --git a/tests/spec/preprocess_dos.c.in b/tests/spec/preprocess_dos.c.in
deleted file mode 100644
index abae8ad374b..00000000000
--- a/tests/spec/preprocess_dos.c.in
+++ /dev/null
@@ -1,13 +0,0 @@
-/* run.config*
-COMMENT: Don't edit directly preprocess_dos.c, but preprocess_dos.c.in
-@DONTRUN@
-OPT: -cpp-command="@PTEST_DIR@/@PTEST_NAME@.sh @UNIX2DOS@ %i %o" -cpp-frama-c-compliant -print
-*/
-
-int main() {
-    int a = 0;
-    /*@
-        assert a == 0;
-    */
-    return a;
-}
-- 
GitLab