From b47abf8a81b1c867d52fee490f8cfff32dfd8e6a Mon Sep 17 00:00:00 2001 From: Simon Sobisch Date: Thu, 25 Jul 2024 13:16:08 +0000 Subject: [PATCH] testing IMP INCLUDE directive --- tests/testsuite.src/used_binaries.at | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/testsuite.src/used_binaries.at b/tests/testsuite.src/used_binaries.at index 7e71e0f76..a4cc5a11c 100644 --- a/tests/testsuite.src/used_binaries.at +++ b/tests/testsuite.src/used_binaries.at @@ -1095,7 +1095,7 @@ AT_CLEANUP AT_SETUP([check include header file]) -#AT_KEYWORDS([cobc copy include imp]) +AT_KEYWORDS([cobc copy directive imp]) AT_DATA([filec.h], [ /* COB_EXT_IMPORT will be defined by libcob.h up-front */ @@ -1171,6 +1171,7 @@ AT_CHECK([$COMPILE_MODULE -Wno-unfinished --copy "f.copy" -fstatic-call prog2.co AT_CHECK([$COMPILE_MODULE -Wno-unfinished --copy "f.copy" -fstatic-call -L. -lfilec prog2.cob -o prog2c], [0], ignore, ignore)] ) +# additional check via directive AT_DATA([prog3.cob], [ >> IMP INCLUDE "file.h" IDENTIFICATION DIVISION. @@ -1182,6 +1183,12 @@ AT_DATA([prog3.cob], [ CALL "f" USING "Hello" BY VALUE long RETURNING NOTHING. ]) +# static build with correct function signature +AT_CHECK([$COMPILE_MODULE -I . -fstatic-call prog3.cob -o prog3], [0], [], [], [ + # Previous test "failed" --> retry with import library + AT_CHECK([$COMPILE_MODULE -I . -fstatic-call -L. -lfilec prog3.cob -o prog3], [0], ignore, ignore)] +) + # static build with correct function signature # AT_CHECK([$COBC -m -I . -fstatic-call prog3.cob], [0], [], [])