Skip to content

Commit

Permalink
testing IMP INCLUDE directive
Browse files Browse the repository at this point in the history
  • Loading branch information
GitMensch committed Jul 25, 2024
1 parent 6760a54 commit b47abf8
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/testsuite.src/used_binaries.at
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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.
Expand All @@ -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], [], [])

Expand Down

0 comments on commit b47abf8

Please sign in to comment.