Skip to content

Commit

Permalink
Improve varying test (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutaro-sakamoto authored Sep 27, 2024
1 parent 24c2cf7 commit 1e54ea9
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/cobol_data.src/varying.at
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ AT_DATA([prog.cbl], [
* PERFORM DISPLAY-TEST-RESULT.
PERFORM UNTIL SQLCODE NOT = ZERO
DISPLAY EMP-NAME-ARR
MOVE IDX TO EMP-NAME-LEN
EXEC SQL
FETCH C1 INTO :EMP-NUM1, :EMP-NAME, :EMP-NUM2
END-EXEC
Expand Down Expand Up @@ -193,15 +194,25 @@ Generate:ROLLBACK
AT_CHECK([${COMPILE_MODULE} prog.cob])
AT_CHECK([${RUN_MODULE} prog], [0],
[A @&t@
+00000001
AB @&t@
+00000002
ABC @&t@
+00000003
ABCD @&t@
+00000004
ABCDE @&t@
+00000005
ABCDEF @&t@
+00000006
ABCDEFG @&t@
+00000007
ABCDEFGH @&t@
+00000008
ABCDEFGHI @&t@
+00000009
ABCDEFGHIJ
+00000010
])

AT_DATA([prog.cbl], [
Expand Down Expand Up @@ -254,6 +265,7 @@ AT_DATA([prog.cbl], [
* PERFORM DISPLAY-TEST-RESULT.
PERFORM UNTIL SQLCODE NOT = ZERO
DISPLAY EMP-NAME-ARR
DISPLAY EMP-NAME-LEN
EXEC SQL
FETCH C1 INTO :EMP-NAME
END-EXEC
Expand Down Expand Up @@ -390,15 +402,25 @@ Generate:ROLLBACK
AT_CHECK([${COMPILE_MODULE} prog.cob])
AT_CHECK([${RUN_MODULE} prog], [0],
[0 @&t@
+00000001
01 @&t@
+00000002
012 @&t@
+00000003
0123 @&t@
+00000004
01234 @&t@
+00000005
012345 @&t@
+00000006
0123456 @&t@
+00000007
01234567 @&t@
+00000008
012345678 @&t@
+00000009
0123456789
+00000010
])

AT_CLEANUP

0 comments on commit 1e54ea9

Please sign in to comment.