Skip to content

Commit 626f49c

Browse files
Fix the command checking the results of NIST test and the read functoin of RELATIVE files (#98)
1 parent d891895 commit 626f49c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

.github/workflows/cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
- name: Run NIST test
9191
run: |
9292
export CLASSPATH=":/usr/lib/opensourcecobol4j/libcobj.jar:$HOME/.java_lib/sqlite.jar"
93-
cd tests/cobol85/
93+
cd tests/cobol85
9494
make test
9595
9696
#- name: Run tests "i18n_utf8"

libcobj/src/jp/osscons/opensourcecobol/libcobj/file/CobolRelativeFile.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package jp.osscons.opensourcecobol.libcobj.file;
2020

2121
import java.io.*;
22+
import java.nio.ByteBuffer;
2223
import java.nio.channels.*;
2324
import java.nio.file.Files;
2425
import java.nio.file.Path;
@@ -283,7 +284,7 @@ public int read_(AbstractCobolField key, int readOpts) {
283284
return COB_STATUS_23_KEY_NOT_EXISTS;
284285
}
285286

286-
if (this.record.getSize() == 0) {
287+
if (ByteBuffer.wrap(size).getLong() == 0) {
287288
this.fp.seek(this.fp.getFilePointer() - size.length);
288289
return COB_STATUS_23_KEY_NOT_EXISTS;
289290
}

tests/cobol85/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ test: $(MODULES_MAKEFILES)
2323
done
2424
perl $(srcdir)/summary.pl $(MODULES) > summary.log
2525
@for MODULE in $(MODULES); do\
26-
(cat $$MODULE/report.txt) \
26+
(cat $$MODULE/report.txt) \
2727
done
2828
cat summary.log
29-
head -n -2 summary.log | tail -n +4 | awk '$$4 != 0 || $$5 != 0 {exit 1}'
29+
cat summary.log | tail -n 1 | awk '$$4 != 0 || $$5 != 0 || $$2 != $$3 {exit 1}'
3030

3131
save:
3232
@for m in $(MODULES); do \

tests/cobol85/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,10 +491,10 @@ test: $(MODULES_MAKEFILES)
491491
done
492492
perl $(srcdir)/summary.pl $(MODULES) > summary.log
493493
@for MODULE in $(MODULES); do\
494-
(cat $$MODULE/report.txt) \
494+
(cat $$MODULE/report.txt) \
495495
done
496496
cat summary.log
497-
head -n -2 summary.log | tail -n +4 | awk '$$4 != 0 || $$5 != 0 {exit 1}'
497+
cat summary.log | tail -n 1 | awk '$$4 != 0 || $$5 != 0 || $$2 != $$3 {exit 1}'
498498

499499
save:
500500
@for m in $(MODULES); do \

tests/cobol85/report.pl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
$skip{SG203A} = 1;
5555
$skip{OBNC1M} = 1;
5656
$skip{OBNC2M} = 1;
57-
#$skip{IX106A} = 1;
5857
$skip{NC127A} = 1;
5958
$skip{NC219A} = 1;
6059
$skip{IC222A} = 1;

0 commit comments

Comments
 (0)