From d3028095e6e2fef33b7a6014b5b3ae12f9ab5c6f Mon Sep 17 00:00:00 2001 From: Yutaro Sakamoto Date: Sun, 3 Mar 2024 17:49:12 +0900 Subject: [PATCH 1/3] [Add]: add a help message for the option `-ext` --- cobj/cobj.c | 1 + 1 file changed, 1 insertion(+) diff --git a/cobj/cobj.c b/cobj/cobj.c index ad750588..3f3e5f15 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -811,6 +811,7 @@ static void cobc_print_usage(void) { puts(_(" -conf= User defined dialect " "configuration - See -std=")); puts(_(" --list-reserved Display reserved words")); + puts(_(" -ext Add default file extension")); puts( _(" -assign_external Set the file assign to external")); puts(_(" -constant Define to for $IF " From 663d67d1777eb930710c96d690ae77b72c2edeb2 Mon Sep 17 00:00:00 2001 From: Yutaro Sakamoto Date: Sun, 3 Mar 2024 18:06:04 +0900 Subject: [PATCH 2/3] [Add]: add a test for `-ext` --- tests/Makefile.am | 1 + tests/Makefile.in | 1 + tests/command-line-options.at | 1 + tests/command-line-options.src/ext.at | 22 ++++++++++++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 tests/command-line-options.src/ext.at diff --git a/tests/Makefile.am b/tests/Makefile.am index a26738a6..96e7d7d0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -149,6 +149,7 @@ command_line_options_DEPENDENCIES = \ command-line-options.src/t.at \ command-line-options.src/B.at \ command-line-options.src/list-reserved.at \ + command-line-options.src/ext.at \ command-line-options.src/assign_external.at \ command-line-options.src/Wobsolete-Warchaic.at \ command-line-options.src/Wredefinition.at \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 7dc83d5b..3f93a17d 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -690,6 +690,7 @@ command_line_options_DEPENDENCIES = \ command-line-options.src/t.at \ command-line-options.src/B.at \ command-line-options.src/list-reserved.at \ + command-line-options.src/ext.at \ command-line-options.src/assign_external.at \ command-line-options.src/Wobsolete-Warchaic.at \ command-line-options.src/Wredefinition.at \ diff --git a/tests/command-line-options.at b/tests/command-line-options.at index f9af0506..c5e4f608 100644 --- a/tests/command-line-options.at +++ b/tests/command-line-options.at @@ -7,6 +7,7 @@ m4_include([C.at]) m4_include([t.at]) m4_include([B.at]) m4_include([list-reserved.at]) +m4_include([ext.at]) m4_include([assign_external.at]) m4_include([java-package.at]) m4_include([Wobsolete-Warchaic.at]) diff --git a/tests/command-line-options.src/ext.at b/tests/command-line-options.src/ext.at new file mode 100644 index 00000000..5dfa49a4 --- /dev/null +++ b/tests/command-line-options.src/ext.at @@ -0,0 +1,22 @@ +AT_SETUP([-ext]) + +AT_DATA([prog.cbl], +[ IDENTIFICATION DIVISION. + PROGRAM-ID. prog. + PROCEDURE DIVISION. + COPY "sub". + STOP RUN. +]) + +AT_DATA([sub.abc563788BBN], +[ DISPLAY "sub". +]) + +AT_CHECK([${COBJ} -ext abc563788BBN prog.cbl]) +AT_CHECK([java prog], [0], +[sub +]) + +AT_CHECK([${COBJ} --help | grep '\-ext' > /dev/null], [0]) + +AT_CLEANUP From f8c458ea80d38d0e00689be09d7c68e696d1e67a Mon Sep 17 00:00:00 2001 From: Yutaro Sakamoto Date: Sun, 3 Mar 2024 18:07:47 +0900 Subject: [PATCH 3/3] [Fix]: fix the help message of `-ext` --- cobj/cobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cobj/cobj.c b/cobj/cobj.c index 3f3e5f15..aa226c7e 100644 --- a/cobj/cobj.c +++ b/cobj/cobj.c @@ -811,7 +811,7 @@ static void cobc_print_usage(void) { puts(_(" -conf= User defined dialect " "configuration - See -std=")); puts(_(" --list-reserved Display reserved words")); - puts(_(" -ext Add default file extension")); + puts(_(" -ext Add default file extension")); puts( _(" -assign_external Set the file assign to external")); puts(_(" -constant Define to for $IF "