Diff of the two buildlogs: -- --- b1/build.log 2024-04-09 03:03:23.042349201 +0000 +++ b2/build.log 2024-04-09 03:07:57.914662004 +0000 @@ -1,6 +1,6 @@ I: pbuilder: network access will be disabled during build -I: Current time: Mon Apr 8 14:51:33 -12 2024 -I: pbuilder-time-stamp: 1712631093 +I: Current time: Tue Apr 9 17:03:41 +14 2024 +I: pbuilder-time-stamp: 1712631821 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/trixie-reproducible-base.tgz] I: copying local configuration @@ -29,52 +29,84 @@ dpkg-source: info: applying xmlbeans-versioned.patch I: Not using root during the build. I: Installing the build-deps -I: user script /srv/workspace/pbuilder/21848/tmp/hooks/D02_print_environment starting +I: user script /srv/workspace/pbuilder/14344/tmp/hooks/D01_modify_environment starting +debug: Running on virt32z. +I: Changing host+domainname to test build reproducibility +I: Adding a custom variable just for the fun of it... +I: Changing /bin/sh to bash +'/bin/sh' -> '/bin/bash' +lrwxrwxrwx 1 root root 9 Apr 9 03:03 /bin/sh -> /bin/bash +I: Setting pbuilder2's login shell to /bin/bash +I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other +I: user script /srv/workspace/pbuilder/14344/tmp/hooks/D01_modify_environment finished +I: user script /srv/workspace/pbuilder/14344/tmp/hooks/D02_print_environment starting I: set - BUILDDIR='/build/reproducible-path' - BUILDUSERGECOS='first user,first room,first work-phone,first home-phone,first other' - BUILDUSERNAME='pbuilder1' - BUILD_ARCH='armhf' - DEBIAN_FRONTEND='noninteractive' - DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=3 ' - DISTRIBUTION='trixie' - HOME='/root' - HOST_ARCH='armhf' + BASH=/bin/sh + BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath + BASH_ALIASES=() + BASH_ARGC=() + BASH_ARGV=() + BASH_CMDS=() + BASH_LINENO=([0]="12" [1]="0") + BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. + BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") + BASH_VERSINFO=([0]="5" [1]="2" [2]="21" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") + BASH_VERSION='5.2.21(1)-release' + BUILDDIR=/build/reproducible-path + BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' + BUILDUSERNAME=pbuilder2 + BUILD_ARCH=armhf + DEBIAN_FRONTEND=noninteractive + DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=4 ' + DIRSTACK=() + DISTRIBUTION=trixie + EUID=0 + FUNCNAME=([0]="Echo" [1]="main") + GROUPS=() + HOME=/root + HOSTNAME=i-capture-the-hostname + HOSTTYPE=arm + HOST_ARCH=armhf IFS=' ' - INVOCATION_ID='73db5128d6cb4ec29782e55e55738b1e' - LANG='C' - LANGUAGE='en_US:en' - LC_ALL='C' - MAIL='/var/mail/root' - OPTIND='1' - PATH='/usr/sbin:/usr/bin:/sbin:/bin:/usr/games' - PBCURRENTCOMMANDLINEOPERATION='build' - PBUILDER_OPERATION='build' - PBUILDER_PKGDATADIR='/usr/share/pbuilder' - PBUILDER_PKGLIBDIR='/usr/lib/pbuilder' - PBUILDER_SYSCONFDIR='/etc' - PPID='21848' - PS1='# ' - PS2='> ' + INVOCATION_ID=e6517fe41d0e4af7adccba199c3d8d14 + LANG=C + LANGUAGE=it_CH:it + LC_ALL=C + MACHTYPE=arm-unknown-linux-gnueabihf + MAIL=/var/mail/root + OPTERR=1 + OPTIND=1 + OSTYPE=linux-gnueabihf + PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path + PBCURRENTCOMMANDLINEOPERATION=build + PBUILDER_OPERATION=build + PBUILDER_PKGDATADIR=/usr/share/pbuilder + PBUILDER_PKGLIBDIR=/usr/lib/pbuilder + PBUILDER_SYSCONFDIR=/etc + PIPESTATUS=([0]="0") + POSIXLY_CORRECT=y + PPID=14344 PS4='+ ' - PWD='/' - SHELL='/bin/bash' - SHLVL='2' - SUDO_COMMAND='/usr/bin/timeout -k 18.1h 18h /usr/bin/ionice -c 3 /usr/bin/nice /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.Ifc7VE0I/pbuilderrc_xWjH --distribution trixie --hookdir /etc/pbuilder/first-build-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.Ifc7VE0I/b1 --logfile b1/build.log octave-io_2.6.4-3.dsc' - SUDO_GID='113' - SUDO_UID='107' - SUDO_USER='jenkins' - TERM='unknown' - TZ='/usr/share/zoneinfo/Etc/GMT+12' - USER='root' - _='/usr/bin/systemd-run' - http_proxy='http://10.0.0.15:3142/' + PWD=/ + SHELL=/bin/bash + SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix + SHLVL=3 + SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.Ifc7VE0I/pbuilderrc_JKEj --distribution trixie --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/trixie-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.Ifc7VE0I/b2 --logfile b2/build.log octave-io_2.6.4-3.dsc' + SUDO_GID=110 + SUDO_UID=103 + SUDO_USER=jenkins + TERM=unknown + TZ=/usr/share/zoneinfo/Etc/GMT-14 + UID=0 + USER=root + _='I: set' + http_proxy=http://10.0.0.15:3142/ I: uname -a - Linux virt64b 6.1.0-18-arm64 #1 SMP Debian 6.1.76-1 (2024-02-01) aarch64 GNU/Linux + Linux i-capture-the-hostname 6.1.0-18-armmp-lpae #1 SMP Debian 6.1.76-1 (2024-02-01) armv7l GNU/Linux I: ls -l /bin - lrwxrwxrwx 1 root root 7 Apr 8 11:24 /bin -> usr/bin -I: user script /srv/workspace/pbuilder/21848/tmp/hooks/D02_print_environment finished + lrwxrwxrwx 1 root root 7 Apr 7 11:25 /bin -> usr/bin +I: user script /srv/workspace/pbuilder/14344/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy @@ -620,7 +652,7 @@ Get: 504 http://deb.debian.org/debian trixie/main armhf gfortran armhf 4:13.2.0-7 [1432 B] Get: 505 http://deb.debian.org/debian trixie/main armhf octave-dev armhf 8.4.0-1+b1 [951 kB] Get: 506 http://deb.debian.org/debian trixie/main armhf dh-octave all 1.8.0 [22.7 kB] -Fetched 176 MB in 13s (13.4 MB/s) +Fetched 176 MB in 4s (43.3 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package netbase. (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 19636 files and directories currently installed.) @@ -2696,7 +2728,11 @@ Building tag database... -> Finished parsing the build-deps I: Building the package -I: Running cd /build/reproducible-path/octave-io-2.6.4/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games" HOME="/nonexistent/first-build" dpkg-genchanges -S > ../octave-io_2.6.4-3_source.changes +I: user script /srv/workspace/pbuilder/14344/tmp/hooks/A99_set_merged_usr starting +Not re-configuring usrmerge for trixie +I: user script /srv/workspace/pbuilder/14344/tmp/hooks/A99_set_merged_usr finished +hostname: Name or service not known +I: Running cd /build/reproducible-path/octave-io-2.6.4/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../octave-io_2.6.4-3_source.changes dpkg-buildpackage: info: source package octave-io dpkg-buildpackage: info: source version 2.6.4-3 dpkg-buildpackage: info: source distribution unstable @@ -2749,22 +2785,22 @@ make[1]: Entering directory '/build/reproducible-path/octave-io-2.6.4/src' /usr/bin/mkoctfile --verbose csvexplode.cc /usr/bin/mkoctfile --verbose csv2cell.cc -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security csvexplode.cc -o /tmp/oct-lOpCAw.o -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security csv2cell.cc -o /tmp/oct-7pGext.o /usr/bin/mkoctfile --verbose csvconcat.cc -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security csvconcat.cc -o /tmp/oct-0gK2He.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security csv2cell.cc -o /tmp/oct-ZcbByD.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security csvexplode.cc -o /tmp/oct-4NDpYv.o +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security csvconcat.cc -o /tmp/oct-2kLci2.o /usr/bin/mkoctfile --verbose cell2csv.cc -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security cell2csv.cc -o /tmp/oct-6lbBBJ.o -g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o cell2csv.oct /tmp/oct-6lbBBJ.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security cell2csv.cc -o /tmp/oct-seMqrA.o +g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o csvconcat.oct /tmp/oct-2kLci2.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o cell2csv.oct /tmp/oct-seMqrA.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o csvexplode.oct /tmp/oct-4NDpYv.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro /usr/bin/mkoctfile --verbose col2num.cc -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security col2num.cc -o /tmp/oct-qNqPfc.o -g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o csvconcat.oct /tmp/oct-0gK2He.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security col2num.cc -o /tmp/oct-K907Hh.o /usr/bin/mkoctfile --verbose num2col.cc -g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security num2col.cc -o /tmp/oct-0xmCyg.o -g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o csvexplode.oct /tmp/oct-lOpCAw.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o csv2cell.oct /tmp/oct-7pGext.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o col2num.oct /tmp/oct-qNqPfc.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro -g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o num2col.oct /tmp/oct-0xmCyg.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -c -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security num2col.cc -o /tmp/oct-TjH6NG.o +g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o csv2cell.oct /tmp/oct-ZcbByD.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o col2num.oct /tmp/oct-K907Hh.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro +g++ -I/usr/include/octave-8.4.0/octave/.. -I/usr/include/octave-8.4.0/octave -pthread -fopenmp -g -O2 -ffile-prefix-map=/build/reproducible-path/octave-io-2.6.4=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -o num2col.oct /tmp/oct-TjH6NG.o -shared -Wl,-Bsymbolic -Wl,-z,relro -L/usr/lib/arm-linux-gnueabihf -shared -Wl,-Bsymbolic -flto=auto -ffat-lto-objects -Wl,-z,relro make[1]: Leaving directory '/build/reproducible-path/octave-io-2.6.4/src' copyfile /build/reproducible-path/octave-io-2.6.4/./src/cell2csv.oct /build/reproducible-path/octave-io-2.6.4/./src/col2num.oct /build/reproducible-path/octave-io-2.6.4/./src/csv2cell.oct /build/reproducible-path/octave-io-2.6.4/./src/csvconcat.oct /build/reproducible-path/octave-io-2.6.4/./src/csvexplode.oct /build/reproducible-path/octave-io-2.6.4/./src/num2col.oct /build/reproducible-path/octave-io-2.6.4/./src/cell2csv.cc-tst /build/reproducible-path/octave-io-2.6.4/./src/col2num.cc-tst /build/reproducible-path/octave-io-2.6.4/./src/csv2cell.cc-tst /build/reproducible-path/octave-io-2.6.4/./src/num2col.cc-tst /build/reproducible-path/octave-io-2.6.4/./inst/arm-unknown-linux-gnueabihf-api-v58 For information about changes from previous versions of the io package, run 'news io'. @@ -2803,327 +2839,6 @@ a = calccelladdress (378, 676); assert (a, "YZ378"); 9 tests, 9 passed, 0 known failure, 0 skipped -[inst/object2json.m] ->>>>> /build/reproducible-path/octave-io-2.6.4/inst/object2json.m -***** test - assert(object2json([logical(1), logical(0)]), '[true,false]'); -warning: object2json is deprecated and will be removed in a future io release -warning: called from - object2json at line 59 column 7 - __test__ at line 3 column 2 - test at line 682 column 11 - /tmp/tmp.6Gwk3Y5OqT at line 22 column 31 - -***** test - car.name = 'Mzd R8'; - car.speedsamples = [98, 33, 50; 56, 120, 102; 77, 82, 93]; - car.toofast = car.speedsamples >= 90; - car.leased = logical(1); - car.european = logical(0); - assert(object2json(car), '{"name":"Mzd R8","speedsamples":[[98,33,50],[56,120,102],[77,82,93]],"toofast":[[true,false,false],[false,true,true],[false,false,true]],"leased":true,"european":false}'); -2 tests, 2 passed, 0 known failure, 0 skipped -[inst/read_namelist.m] ->>>>> /build/reproducible-path/octave-io-2.6.4/inst/read_namelist.m -***** test - fn = tempname (); - fid = fopen (fn, "w"); - fprintf (fid, "&test\n"); - fprintf (fid, " z = (1.1,2.2), (0.,1.), (1.,0.)\n"); - fprintf (fid, " y = (9,8)\n"); - fprintf (fid, " a = 1. 2. 3.\n"); - fprintf (fid, [' c = "(test)"' "\n" '\\' "\n"]); - fclose (fid); - nm = read_namelist (fn); - unlink (fn); - assert (nm.test.z, [1.1+2.2i, 1i, 1], eps); - assert (nm.test.y, 9+8i, eps); - assert (nm.test.a, [1 2 3], eps); -***** test - fn = tempname (); - fid = fopen (fn, "w"); - fprintf (fid, "&test\n"); - fprintf (fid, " a = 1,\n"); - fprintf (fid, " /\n"); - fclose (fid); - nm = read_namelist (fn); - unlink (fn); - assert (nm.test.a, 1, eps); -***** test - fn = tempname(); - fid = fopen (fn, "w"); - fprintf (fid, "&test\n"); - fprintf (fid, " a = '/',\n"); % inside apostrophes - fprintf (fid, " b = ""/"",\n"); % inside double quotes - fprintf (fid, " c = '""/',\n"); % with double quotes inside apostrophes - fprintf (fid, " d = ""'/"",\n"); % with apostrophes inside double quotes - fprintf (fid, "/\n"); - fclose (fid); - nm = read_namelist (fn); - unlink (fn); - assert (strcmp(nm.test.a, '/'), 1, eps); - assert (strcmp(nm.test.b, '/'), 1, eps); - assert (strcmp(nm.test.c, '"/'), 1, eps); - assert (strcmp(nm.test.d, '''/'), 1, eps); -3 tests, 3 passed, 0 known failure, 0 skipped -[inst/toJSON.m] ->>>>> /build/reproducible-path/octave-io-2.6.4/inst/toJSON.m -***** test ## invalid args -***** warning toJSON(0,struct); -***** warning toJSON(0,:,struct); -***** test ## no args - assert(toJSON(),''); -***** test ## empty string - assert(toJSON(''),'""'); -***** test ## empty array - assert(toJSON([]),'[]'); -***** test ## zero - assert(toJSON(0),"0") -***** test ## false - assert(toJSON(false),'false') -***** test ## float - assert(toJSON(pi),'3.14159265358979') -***** test ## PREC input arg test - assert(toJSON(pi, 0),'3') - assert(toJSON(pi, 5),'3.1416') - assert(toJSON(pi, -5),'3.1416') - assert(toJSON(pi, 25),'3.141592653589793115997963') - assert(toJSON(pi, :),'3.14159265358979') - assert(toJSON(pi, []),'3.14159265358979') - assert(toJSON(pi, false),'3.14159265358979'); - assert(toJSON(pi, {}),'3.14159265358979'); -***** test ## number single - assert(toJSON(single(pi)),'3.14159274101257') -***** test ## number int8 - assert(toJSON(int8(pi)),'3') -***** test ## number int32 - assert(toJSON(int32(pi)),'3') -***** test ## number string - assert(toJSON("3"),'"3"') -***** test ## string - assert(toJSON("abcdefg"), '"abcdefg"'); -***** test ## unknown class - if usejava("jvm") - obj = javaObject ("java.math.BigDecimal", 1.0); - assert(toJSON(obj), '"[java.math.BigDecimal]"'); - endif -***** test ## apparent JSON string, do not quote - assert(toJSON('[]'),'[]'); - assert(toJSON('[1,2, 3]'),'[1,2, 3]'); - assert(toJSON('{}'),'{}'); - assert(toJSON('{"a":4}'),'{"a":4}'); - assert(toJSON('""'),'""'); -***** test ## apparent JSON string blocked, quote it - assert(toJSON('"abc def" '),'"\"abc def\" "'); -***** test ## vectors - assert(toJSON([1,2,3]),'[1,2,3]') - assert(toJSON([1;2;3]),'[1,2,3]') -***** test ## vector with PREC - assert(toJSON(pi*(1:4),3),'[3.14,6.28,9.42,12.6]') -***** test ## matrix - assert(toJSON([1,2,3;13,14,15]),'[[1,2,3],[13,14,15]]') -***** test ## boolean 2D array - assert(toJSON(![1 1;0 1]),'[[false,false],[true,false]]') -***** test ## ND array - assert(toJSON(reshape(1:8,2,2,2)),'[[[1,3],[2,4]],[[5,7],[6,8]]]') -***** test ## more N ND array - ndmat = ones(2,2,2,3); - ndmat([4,9,21]) = [4,9,21]; - json = toJSON(ndmat); - assert(json,'[[[[1,1],[1,4]],[[1,1],[1,1]]],[[[9,1],[1,1]],[[1,1],[1,1]]],[[[1,1],[1,1]],[[21,1],[1,1]]]]') -***** test ## string array - assert(toJSON(["a";"bc";"defg"]), '["a ","bc ","defg"]'); -***** test ## string array - assert(toJSON(["a";"bc";"defg"]'), '["abd"," ce"," f"," g"]'); -***** test ## cell vector - assert(toJSON({1,2,3}),'[1,2,3]') - assert(toJSON({1;2;3}),'[1,2,3]') -***** test ## mixed cell vector - assert(toJSON({1,2,3,"a"}),'[1,2,3,"a"]') -***** test ## cell array of numerical vectors - assert(toJSON({[1,2,3];[3,4,5]}),'[[1,2,3],[3,4,5]]') -***** test ## numerical ND cell array (look just like ND numerical array) - json = toJSON(num2cell(reshape(1:8,2,2,2))); - assert(json,'[[[1,3],[2,4]],[[5,7],[6,8]]]') -***** test ## numerical ND cell array, with PREC - c = num2cell(reshape(1:8,2,2,2)); c{5} = pi; - assert(toJSON(c,5),'[[[1,3],[2,4]],[[3.1416,7],[6,8]]]') -***** test ## mixed ND cell array - c = num2cell(reshape(1:8,2,2,2)); c{5} = "a"; - assert(toJSON(c),'[[[1,3],[2,4]],[["a",7],[6,8]]]') -***** test ## structure numbers - assert(toJSON(struct(), true),'{}') -***** test ## structure numbers - assert(toJSON(struct("a",3,"b",5), true),'{"a":3,"b":5}') -***** test ## structure string - s = struct("a","hello","b",4); - assert(toJSON(s, true),'{"a":"hello","b":4}') -***** test ## structure string array - s = struct("a","","b",4); s.a = {"hello","bye"}; - assert(toJSON(s, true),'{"a":["hello","bye"],"b":4}') -***** test ## structure array COMPACT=false - assert(toJSON(struct("a",{3.125;3.125}), false),'[{"a":3.125},{"a":3.125}]') -***** test ## structure array COMPACT=true - assert(toJSON(struct("a",{3.125;3.125}), true),'{"a":[3.125,3.125]}') - assert(toJSON(struct("a",{pi;pi}), 5, true),'{"a":[3.1416,3.1416]}') -***** test ## structure array 2D - s = struct("a",{1 3;2 4},"b",{11 13;12 14}); - assert(toJSON(s, true),'{"a":[[1,3],[2,4]],"b":[[11,13],[12,14]]}') -***** test ## structure array 2D COMPACT=false - s = struct("a",{1 3;2 4},"b",{11 13;12 14}); - assert(toJSON(s, false),'[[{"a":1,"b":11},{"a":3,"b":13}],[{"a":2,"b":12},{"a":4,"b":14}]]') -***** test ## mixed cell array - assert(toJSON({1,2,3,"a",struct("a",3)}, true),'[1,2,3,"a",{"a":3}]') -***** test ## complex number - assert(toJSON(i, true),'{"re":0,"im":1}'); -***** test ## complex number 1D array - assert(toJSON([i,1], true),'{"re":[0,1],"im":[1,0]}'); -***** test ## complex number COMPACT=false, - assert(toJSON([i,1], false),'[{"re":0,"im":1},{"re":1,"im":0}]'); -***** test ## test complex number 2D array - assert(toJSON([i 1;2 i*3],true),'{"re":[[0,1],[2,0]],"im":[[1,0],[0,3]]}'); -***** test ## struct with complex number - assert(toJSON(struct('a',1+i,'b',3),true), '{"a":{"re":1,"im":1},"b":3}'); -***** test ## struct ARRAY with complex number - json = toJSON(struct('a',{1;i},'b',{5;2}),true); - assert(json, '{"a":{"re":[1,0],"im":[0,1]},"b":[5,2]}'); -***** test ## struct ARRAY with complex number COMPACT=false, - json = toJSON(struct('a',{1;i},'b',{5;2}),false); - assert(json, '[{"a":1,"b":5},{"a":{"re":0,"im":1},"b":2}]'); -***** test ## struct ARRAY with complex number COMPACT=false, - json = toJSON(struct('a',{[1 2i];[3 i]},'b',{5;2}),false); - assert(json, '[{"a":[{"re":1,"im":0},{"re":0,"im":2}],"b":5},{"a":[{"re":3,"im":0},{"re":0,"im":1}],"b":2}]'); -***** test ## ND struct array - json=toJSON(struct('a',num2cell(reshape(1:8,2,2,2))),true); - assert(json, '{"a":[[[1,3],[2,4]],[[5,7],[6,8]]]}'); -***** test ## ND struct array COMPACT=false, - json=toJSON(struct('a',num2cell(reshape(1:8,2,2,2))),false); - assert(json, '[[[{"a":1},{"a":3}],[{"a":2},{"a":4}]],[[{"a":5},{"a":7}],[{"a":6},{"a":8}]]]'); -***** test ## inline function - assert(toJSON(@sin),'"@@(x) sin(x)"') - assert(toJSON(@(a,b)a+b+c),'"@@(a, b) a + b + c"') -***** test ## struct with java object - if usejava("jvm") - obj = javaObject ("java.math.BigDecimal", 1.0); - assert(toJSON(struct('a',obj)), '{"a":"[java.math.BigDecimal]"}'); - endif -***** test ## structure array DEFAULT COMPACT - s = struct("a",{3.125;3.125}); - assert(toJSON(s),'[{"a":3.125},{"a":3.125}]') -***** test %% jsondecode's a big test - var1 = struct ('para', ['A meta-markup language, used to create ' ... - 'markup languages such as DocBook.'], ... - 'GlossSeeAlso', {{'GML'; 'XML'}}); - var2 = struct ('ID', 'SGML', 'SortAs', 'SGML', ... - 'GlossTerm', 'Standard Generalized Markup Language', ... - 'Acronym', 'SGML', 'Abbrev', 'ISO 8879:1986', ... - 'GlossDef', var1, 'GlossSee', 'markup'); - data = struct ('glossary', ... - struct ('title', 'example glossary', ... - 'GlossDiv', struct ('title', 'S', ... - 'GlossList', ... - struct ('GlossEntry', var2)))); - exp = ['{' , ... - '"glossary":{', ... - '"title":"example glossary",', ... - '"GlossDiv":{', ... - '"title":"S",', ... - '"GlossList":{', ... - '"GlossEntry":{', ... - '"ID":"SGML",', ... - '"SortAs":"SGML",', ... - '"GlossTerm":"Standard Generalized Markup Language",', ... - '"Acronym":"SGML",', ... - '"Abbrev":"ISO 8879:1986",', ... - '"GlossDef":{', ... - '"para":"A meta-markup language, ', ... - 'used to create markup languages such as DocBook.",', ... - '"GlossSeeAlso":["GML","XML"]', ... - '},', ... - '"GlossSee":"markup"', ... - '}', ... - '}', ... - '}', ... - '}', ... - '}']; - assert (toJSON (data), exp); -***** test %% jsondecode's another big Test - var1 = struct ('id', {0; 1; 2}, 'name', {'Collins'; 'Hays'; 'Griffin'}); - var2 = struct ('id', {0; 1; 2}, 'name', {'Osborn'; 'Mcdowell'; 'Jewel'}); - var3 = struct ('id', {0; 1; 2}, 'name', {'Socorro'; 'Darla'; 'Leanne'}); - data = struct (... - 'x_id', {'5ee28980fc9ab3'; '5ee28980dd7250'; '5ee289802422ac'}, ... - 'index', {0; 1; 2}, ... - 'guid', {'b229d1de-f94a'; '39cee338-01fb'; '3db8d55a-663e'}, ... - 'latitude', {-17.124067; 13.205994; -35.453456}, ... - 'longitude', {-61.161831; -37.276231; 14.080287}, ... - 'friends', {var1; var2; var3}); - exp = ['[', ... - '{', ... - '"x_id":"5ee28980fc9ab3",', ... - '"index":0,', ... - '"guid":"b229d1de-f94a",', ... - '"latitude":-17.124067,', ... - '"longitude":-61.161831,', ... - '"friends":[', ... - '{', ... - '"id":0,', ... - '"name":"Collins"', ... - '},', ... - '{', ... - '"id":1,', ... - '"name":"Hays"', ... - '},', ... - '{', ... - '"id":2,', ... - '"name":"Griffin"', ... - '}', ... - ']', ... - '},', ... - '{', ... - '"x_id":"5ee28980dd7250",', ... - '"index":1,', ... - '"guid":"39cee338-01fb",', ... - '"latitude":13.205994,', ... - '"longitude":-37.276231,', ... - '"friends":[', ... - '{', ... - '"id":0,', ... - '"name":"Osborn"', ... - '},', ... - '{', ... - '"id":1,', ... - '"name":"Mcdowell"', ... - '},', ... - '{', ... - '"id":2,', ... - '"name":"Jewel"', ... - '}', ... - ']', ... - '},', ... - '{', ... - '"x_id":"5ee289802422ac",', ... - '"index":2,', ... - '"guid":"3db8d55a-663e",', ... - '"latitude":-35.453456,', ... - '"longitude":14.080287,', ... - '"friends":[', ... - '{', ... - '"id":0,', ... - '"name":"Socorro"', ... - '},', ... - '{', ... - '"id":1,', ... - '"name":"Darla"', ... - '},', ... - '{', ... - '"id":2,', ... - '"name":"Leanne"', ... - '}', ... - ']', ... - '}', ... - ']']; - assert (toJSON (data), exp); -56 tests, 56 passed, 0 known failure, 0 skipped [inst/fromJSON.m] >>>>> /build/reproducible-path/octave-io-2.6.4/inst/fromJSON.m ***** test ## input validation @@ -3581,6 +3296,327 @@ assert (fromJSON(json, true), exp ); assert (fromJSON(json, false), {exp}); 152 tests, 152 passed, 0 known failure, 0 skipped +[inst/toJSON.m] +>>>>> /build/reproducible-path/octave-io-2.6.4/inst/toJSON.m +***** test ## invalid args +***** warning toJSON(0,struct); +***** warning toJSON(0,:,struct); +***** test ## no args + assert(toJSON(),''); +***** test ## empty string + assert(toJSON(''),'""'); +***** test ## empty array + assert(toJSON([]),'[]'); +***** test ## zero + assert(toJSON(0),"0") +***** test ## false + assert(toJSON(false),'false') +***** test ## float + assert(toJSON(pi),'3.14159265358979') +***** test ## PREC input arg test + assert(toJSON(pi, 0),'3') + assert(toJSON(pi, 5),'3.1416') + assert(toJSON(pi, -5),'3.1416') + assert(toJSON(pi, 25),'3.141592653589793115997963') + assert(toJSON(pi, :),'3.14159265358979') + assert(toJSON(pi, []),'3.14159265358979') + assert(toJSON(pi, false),'3.14159265358979'); + assert(toJSON(pi, {}),'3.14159265358979'); +***** test ## number single + assert(toJSON(single(pi)),'3.14159274101257') +***** test ## number int8 + assert(toJSON(int8(pi)),'3') +***** test ## number int32 + assert(toJSON(int32(pi)),'3') +***** test ## number string + assert(toJSON("3"),'"3"') +***** test ## string + assert(toJSON("abcdefg"), '"abcdefg"'); +***** test ## unknown class + if usejava("jvm") + obj = javaObject ("java.math.BigDecimal", 1.0); + assert(toJSON(obj), '"[java.math.BigDecimal]"'); + endif +***** test ## apparent JSON string, do not quote + assert(toJSON('[]'),'[]'); + assert(toJSON('[1,2, 3]'),'[1,2, 3]'); + assert(toJSON('{}'),'{}'); + assert(toJSON('{"a":4}'),'{"a":4}'); + assert(toJSON('""'),'""'); +***** test ## apparent JSON string blocked, quote it + assert(toJSON('"abc def" '),'"\"abc def\" "'); +***** test ## vectors + assert(toJSON([1,2,3]),'[1,2,3]') + assert(toJSON([1;2;3]),'[1,2,3]') +***** test ## vector with PREC + assert(toJSON(pi*(1:4),3),'[3.14,6.28,9.42,12.6]') +***** test ## matrix + assert(toJSON([1,2,3;13,14,15]),'[[1,2,3],[13,14,15]]') +***** test ## boolean 2D array + assert(toJSON(![1 1;0 1]),'[[false,false],[true,false]]') +***** test ## ND array + assert(toJSON(reshape(1:8,2,2,2)),'[[[1,3],[2,4]],[[5,7],[6,8]]]') +***** test ## more N ND array + ndmat = ones(2,2,2,3); + ndmat([4,9,21]) = [4,9,21]; + json = toJSON(ndmat); + assert(json,'[[[[1,1],[1,4]],[[1,1],[1,1]]],[[[9,1],[1,1]],[[1,1],[1,1]]],[[[1,1],[1,1]],[[21,1],[1,1]]]]') +***** test ## string array + assert(toJSON(["a";"bc";"defg"]), '["a ","bc ","defg"]'); +***** test ## string array + assert(toJSON(["a";"bc";"defg"]'), '["abd"," ce"," f"," g"]'); +***** test ## cell vector + assert(toJSON({1,2,3}),'[1,2,3]') + assert(toJSON({1;2;3}),'[1,2,3]') +***** test ## mixed cell vector + assert(toJSON({1,2,3,"a"}),'[1,2,3,"a"]') +***** test ## cell array of numerical vectors + assert(toJSON({[1,2,3];[3,4,5]}),'[[1,2,3],[3,4,5]]') +***** test ## numerical ND cell array (look just like ND numerical array) + json = toJSON(num2cell(reshape(1:8,2,2,2))); + assert(json,'[[[1,3],[2,4]],[[5,7],[6,8]]]') +***** test ## numerical ND cell array, with PREC + c = num2cell(reshape(1:8,2,2,2)); c{5} = pi; + assert(toJSON(c,5),'[[[1,3],[2,4]],[[3.1416,7],[6,8]]]') +***** test ## mixed ND cell array + c = num2cell(reshape(1:8,2,2,2)); c{5} = "a"; + assert(toJSON(c),'[[[1,3],[2,4]],[["a",7],[6,8]]]') +***** test ## structure numbers + assert(toJSON(struct(), true),'{}') +***** test ## structure numbers + assert(toJSON(struct("a",3,"b",5), true),'{"a":3,"b":5}') +***** test ## structure string + s = struct("a","hello","b",4); + assert(toJSON(s, true),'{"a":"hello","b":4}') +***** test ## structure string array + s = struct("a","","b",4); s.a = {"hello","bye"}; + assert(toJSON(s, true),'{"a":["hello","bye"],"b":4}') +***** test ## structure array COMPACT=false + assert(toJSON(struct("a",{3.125;3.125}), false),'[{"a":3.125},{"a":3.125}]') +***** test ## structure array COMPACT=true + assert(toJSON(struct("a",{3.125;3.125}), true),'{"a":[3.125,3.125]}') + assert(toJSON(struct("a",{pi;pi}), 5, true),'{"a":[3.1416,3.1416]}') +***** test ## structure array 2D + s = struct("a",{1 3;2 4},"b",{11 13;12 14}); + assert(toJSON(s, true),'{"a":[[1,3],[2,4]],"b":[[11,13],[12,14]]}') +***** test ## structure array 2D COMPACT=false + s = struct("a",{1 3;2 4},"b",{11 13;12 14}); + assert(toJSON(s, false),'[[{"a":1,"b":11},{"a":3,"b":13}],[{"a":2,"b":12},{"a":4,"b":14}]]') +***** test ## mixed cell array + assert(toJSON({1,2,3,"a",struct("a",3)}, true),'[1,2,3,"a",{"a":3}]') +***** test ## complex number + assert(toJSON(i, true),'{"re":0,"im":1}'); +***** test ## complex number 1D array + assert(toJSON([i,1], true),'{"re":[0,1],"im":[1,0]}'); +***** test ## complex number COMPACT=false, + assert(toJSON([i,1], false),'[{"re":0,"im":1},{"re":1,"im":0}]'); +***** test ## test complex number 2D array + assert(toJSON([i 1;2 i*3],true),'{"re":[[0,1],[2,0]],"im":[[1,0],[0,3]]}'); +***** test ## struct with complex number + assert(toJSON(struct('a',1+i,'b',3),true), '{"a":{"re":1,"im":1},"b":3}'); +***** test ## struct ARRAY with complex number + json = toJSON(struct('a',{1;i},'b',{5;2}),true); + assert(json, '{"a":{"re":[1,0],"im":[0,1]},"b":[5,2]}'); +***** test ## struct ARRAY with complex number COMPACT=false, + json = toJSON(struct('a',{1;i},'b',{5;2}),false); + assert(json, '[{"a":1,"b":5},{"a":{"re":0,"im":1},"b":2}]'); +***** test ## struct ARRAY with complex number COMPACT=false, + json = toJSON(struct('a',{[1 2i];[3 i]},'b',{5;2}),false); + assert(json, '[{"a":[{"re":1,"im":0},{"re":0,"im":2}],"b":5},{"a":[{"re":3,"im":0},{"re":0,"im":1}],"b":2}]'); +***** test ## ND struct array + json=toJSON(struct('a',num2cell(reshape(1:8,2,2,2))),true); + assert(json, '{"a":[[[1,3],[2,4]],[[5,7],[6,8]]]}'); +***** test ## ND struct array COMPACT=false, + json=toJSON(struct('a',num2cell(reshape(1:8,2,2,2))),false); + assert(json, '[[[{"a":1},{"a":3}],[{"a":2},{"a":4}]],[[{"a":5},{"a":7}],[{"a":6},{"a":8}]]]'); +***** test ## inline function + assert(toJSON(@sin),'"@@(x) sin(x)"') + assert(toJSON(@(a,b)a+b+c),'"@@(a, b) a + b + c"') +***** test ## struct with java object + if usejava("jvm") + obj = javaObject ("java.math.BigDecimal", 1.0); + assert(toJSON(struct('a',obj)), '{"a":"[java.math.BigDecimal]"}'); + endif +***** test ## structure array DEFAULT COMPACT + s = struct("a",{3.125;3.125}); + assert(toJSON(s),'[{"a":3.125},{"a":3.125}]') +***** test %% jsondecode's a big test + var1 = struct ('para', ['A meta-markup language, used to create ' ... + 'markup languages such as DocBook.'], ... + 'GlossSeeAlso', {{'GML'; 'XML'}}); + var2 = struct ('ID', 'SGML', 'SortAs', 'SGML', ... + 'GlossTerm', 'Standard Generalized Markup Language', ... + 'Acronym', 'SGML', 'Abbrev', 'ISO 8879:1986', ... + 'GlossDef', var1, 'GlossSee', 'markup'); + data = struct ('glossary', ... + struct ('title', 'example glossary', ... + 'GlossDiv', struct ('title', 'S', ... + 'GlossList', ... + struct ('GlossEntry', var2)))); + exp = ['{' , ... + '"glossary":{', ... + '"title":"example glossary",', ... + '"GlossDiv":{', ... + '"title":"S",', ... + '"GlossList":{', ... + '"GlossEntry":{', ... + '"ID":"SGML",', ... + '"SortAs":"SGML",', ... + '"GlossTerm":"Standard Generalized Markup Language",', ... + '"Acronym":"SGML",', ... + '"Abbrev":"ISO 8879:1986",', ... + '"GlossDef":{', ... + '"para":"A meta-markup language, ', ... + 'used to create markup languages such as DocBook.",', ... + '"GlossSeeAlso":["GML","XML"]', ... + '},', ... + '"GlossSee":"markup"', ... + '}', ... + '}', ... + '}', ... + '}', ... + '}']; + assert (toJSON (data), exp); +***** test %% jsondecode's another big Test + var1 = struct ('id', {0; 1; 2}, 'name', {'Collins'; 'Hays'; 'Griffin'}); + var2 = struct ('id', {0; 1; 2}, 'name', {'Osborn'; 'Mcdowell'; 'Jewel'}); + var3 = struct ('id', {0; 1; 2}, 'name', {'Socorro'; 'Darla'; 'Leanne'}); + data = struct (... + 'x_id', {'5ee28980fc9ab3'; '5ee28980dd7250'; '5ee289802422ac'}, ... + 'index', {0; 1; 2}, ... + 'guid', {'b229d1de-f94a'; '39cee338-01fb'; '3db8d55a-663e'}, ... + 'latitude', {-17.124067; 13.205994; -35.453456}, ... + 'longitude', {-61.161831; -37.276231; 14.080287}, ... + 'friends', {var1; var2; var3}); + exp = ['[', ... + '{', ... + '"x_id":"5ee28980fc9ab3",', ... + '"index":0,', ... + '"guid":"b229d1de-f94a",', ... + '"latitude":-17.124067,', ... + '"longitude":-61.161831,', ... + '"friends":[', ... + '{', ... + '"id":0,', ... + '"name":"Collins"', ... + '},', ... + '{', ... + '"id":1,', ... + '"name":"Hays"', ... + '},', ... + '{', ... + '"id":2,', ... + '"name":"Griffin"', ... + '}', ... + ']', ... + '},', ... + '{', ... + '"x_id":"5ee28980dd7250",', ... + '"index":1,', ... + '"guid":"39cee338-01fb",', ... + '"latitude":13.205994,', ... + '"longitude":-37.276231,', ... + '"friends":[', ... + '{', ... + '"id":0,', ... + '"name":"Osborn"', ... + '},', ... + '{', ... + '"id":1,', ... + '"name":"Mcdowell"', ... + '},', ... + '{', ... + '"id":2,', ... + '"name":"Jewel"', ... + '}', ... + ']', ... + '},', ... + '{', ... + '"x_id":"5ee289802422ac",', ... + '"index":2,', ... + '"guid":"3db8d55a-663e",', ... + '"latitude":-35.453456,', ... + '"longitude":14.080287,', ... + '"friends":[', ... + '{', ... + '"id":0,', ... + '"name":"Socorro"', ... + '},', ... + '{', ... + '"id":1,', ... + '"name":"Darla"', ... + '},', ... + '{', ... + '"id":2,', ... + '"name":"Leanne"', ... + '}', ... + ']', ... + '}', ... + ']']; + assert (toJSON (data), exp); +56 tests, 56 passed, 0 known failure, 0 skipped +[inst/object2json.m] +>>>>> /build/reproducible-path/octave-io-2.6.4/inst/object2json.m +***** test + assert(object2json([logical(1), logical(0)]), '[true,false]'); +warning: object2json is deprecated and will be removed in a future io release +warning: called from + object2json at line 59 column 7 + __test__ at line 3 column 2 + test at line 682 column 11 + /tmp/tmp.gB9aJNFPk5 at line 38 column 31 + +***** test + car.name = 'Mzd R8'; + car.speedsamples = [98, 33, 50; 56, 120, 102; 77, 82, 93]; + car.toofast = car.speedsamples >= 90; + car.leased = logical(1); + car.european = logical(0); + assert(object2json(car), '{"name":"Mzd R8","speedsamples":[[98,33,50],[56,120,102],[77,82,93]],"toofast":[[true,false,false],[false,true,true],[false,false,true]],"leased":true,"european":false}'); +2 tests, 2 passed, 0 known failure, 0 skipped +[inst/read_namelist.m] +>>>>> /build/reproducible-path/octave-io-2.6.4/inst/read_namelist.m +***** test + fn = tempname (); + fid = fopen (fn, "w"); + fprintf (fid, "&test\n"); + fprintf (fid, " z = (1.1,2.2), (0.,1.), (1.,0.)\n"); + fprintf (fid, " y = (9,8)\n"); + fprintf (fid, " a = 1. 2. 3.\n"); + fprintf (fid, [' c = "(test)"' "\n" '\\' "\n"]); + fclose (fid); + nm = read_namelist (fn); + unlink (fn); + assert (nm.test.z, [1.1+2.2i, 1i, 1], eps); + assert (nm.test.y, 9+8i, eps); + assert (nm.test.a, [1 2 3], eps); +***** test + fn = tempname (); + fid = fopen (fn, "w"); + fprintf (fid, "&test\n"); + fprintf (fid, " a = 1,\n"); + fprintf (fid, " /\n"); + fclose (fid); + nm = read_namelist (fn); + unlink (fn); + assert (nm.test.a, 1, eps); +***** test + fn = tempname(); + fid = fopen (fn, "w"); + fprintf (fid, "&test\n"); + fprintf (fid, " a = '/',\n"); % inside apostrophes + fprintf (fid, " b = ""/"",\n"); % inside double quotes + fprintf (fid, " c = '""/',\n"); % with double quotes inside apostrophes + fprintf (fid, " d = ""'/"",\n"); % with apostrophes inside double quotes + fprintf (fid, "/\n"); + fclose (fid); + nm = read_namelist (fn); + unlink (fn); + assert (strcmp(nm.test.a, '/'), 1, eps); + assert (strcmp(nm.test.b, '/'), 1, eps); + assert (strcmp(nm.test.c, '"/'), 1, eps); + assert (strcmp(nm.test.d, '''/'), 1, eps); +3 tests, 3 passed, 0 known failure, 0 skipped Checking C++ files ... [src/cell2csv.cc] >>>>> /build/reproducible-path/octave-io-2.6.4/src/cell2csv.cc @@ -3800,8 +3836,8 @@ dpkg-gencontrol: warning: package octave-io: substitution variable ${octave:Upstream-Description} unused, but is defined dh_md5sums -O--buildsystem=octave dh_builddeb -O--buildsystem=octave -dpkg-deb: building package 'octave-io-dbgsym' in '../octave-io-dbgsym_2.6.4-3_armhf.deb'. dpkg-deb: building package 'octave-io' in '../octave-io_2.6.4-3_armhf.deb'. +dpkg-deb: building package 'octave-io-dbgsym' in '../octave-io-dbgsym_2.6.4-3_armhf.deb'. dpkg-genbuildinfo --build=binary -O../octave-io_2.6.4-3_armhf.buildinfo dpkg-genchanges --build=binary -O../octave-io_2.6.4-3_armhf.changes dpkg-genchanges: info: binary-only upload (no source code included) @@ -3809,12 +3845,14 @@ dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration +I: user script /srv/workspace/pbuilder/14344/tmp/hooks/B01_cleanup starting +I: user script /srv/workspace/pbuilder/14344/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env -I: removing directory /srv/workspace/pbuilder/21848 and its subdirectories -I: Current time: Mon Apr 8 15:03:14 -12 2024 -I: pbuilder-time-stamp: 1712631794 +I: removing directory /srv/workspace/pbuilder/14344 and its subdirectories +I: Current time: Tue Apr 9 17:07:53 +14 2024 +I: pbuilder-time-stamp: 1712632073