Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:
- name: Run NIST test
run: |
export CLASSPATH=":/usr/lib/opensourcecobol4j/libcobj.jar:$HOME/.java_lib/sqlite.jar"
cd tests/cobol85/
cd tests/cobol85
make test

#- name: Run tests "i18n_utf8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package jp.osscons.opensourcecobol.libcobj.file;

import java.io.*;
import java.nio.ByteBuffer;
import java.nio.channels.*;
import java.nio.file.Files;
import java.nio.file.Path;
Expand Down Expand Up @@ -283,7 +284,7 @@ public int read_(AbstractCobolField key, int readOpts) {
return COB_STATUS_23_KEY_NOT_EXISTS;
}

if (this.record.getSize() == 0) {
if (ByteBuffer.wrap(size).getLong() == 0) {
this.fp.seek(this.fp.getFilePointer() - size.length);
return COB_STATUS_23_KEY_NOT_EXISTS;
}
Expand Down
4 changes: 2 additions & 2 deletions tests/cobol85/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ test: $(MODULES_MAKEFILES)
done
perl $(srcdir)/summary.pl $(MODULES) > summary.log
@for MODULE in $(MODULES); do\
(cat $$MODULE/report.txt) \
(cat $$MODULE/report.txt) \
done
cat summary.log
head -n -2 summary.log | tail -n +4 | awk '$$4 != 0 || $$5 != 0 {exit 1}'
cat summary.log | tail -n 1 | awk '$$4 != 0 || $$5 != 0 || $$2 != $$3 {exit 1}'

save:
@for m in $(MODULES); do \
Expand Down
4 changes: 2 additions & 2 deletions tests/cobol85/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -491,10 +491,10 @@ test: $(MODULES_MAKEFILES)
done
perl $(srcdir)/summary.pl $(MODULES) > summary.log
@for MODULE in $(MODULES); do\
(cat $$MODULE/report.txt) \
(cat $$MODULE/report.txt) \
done
cat summary.log
head -n -2 summary.log | tail -n +4 | awk '$$4 != 0 || $$5 != 0 {exit 1}'
cat summary.log | tail -n 1 | awk '$$4 != 0 || $$5 != 0 || $$2 != $$3 {exit 1}'

save:
@for m in $(MODULES); do \
Expand Down
1 change: 0 additions & 1 deletion tests/cobol85/report.pl
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
$skip{SG203A} = 1;
$skip{OBNC1M} = 1;
$skip{OBNC2M} = 1;
#$skip{IX106A} = 1;
$skip{NC127A} = 1;
$skip{NC219A} = 1;
$skip{IC222A} = 1;
Expand Down