This commit is contained in:
John Kerl 2020-09-03 00:16:47 -04:00
parent 1e5e82cd0d
commit 66ec342f47
229 changed files with 71740 additions and 0 deletions

123
go/reg_test/dev Executable file
View file

@ -0,0 +1,123 @@
#!/bin/sh
# ================================================================
# This is similar to reg_test/run except that this one is only ever run
# manually, not automatically as part of the build. It can be used to iterate on
# as-yet-unreleased features (in particular, features whose definition isn't
# finalized) without breaking the build.
# ================================================================
set -e
ourdir=`dirname $0`
srcdir=$ourdir/../..
pwd=`pwd`
try1=$pwd/../mlr # For autoconf builds, in-tree or out-of-tree
try2=$srcdir/c/mlr # For non-autoconf builds
if [ -x "$try1" ]; then
path_to_mlr=$try1
elif [ -x "$try2" ]; then
path_to_mlr=$try2
else
echo "$0: Could not find path to mlr executable." 1>&2
echo "Try 1: $try1" 1>&2
echo "Try 2: $try2" 1>&2
exit 1
fi
do_diff="true"
for arg; do
if [ "$1" = "--valgrind" ]; then
# Leak-check the test suite. Needs 'make mlrg' first.
# ../tools/clean-valg can be used to filter the output.
path_to_mlr="valgrind --leak-check=full ${path_to_mlr}g"
elif [ "$1" = "--nodiff" ]; then
do_diff="false"
fi
done
echo Using mlr executable $path_to_mlr
indir=$ourdir/input
expdir=$ourdir/expected
outdir=$pwd/output-regtest
reloutdir=./output-regtest
outfile=$outdir/out
expfile=$expdir/out
mkdir -p $outdir
rm -rvf $outdir
mkdir -p $outdir
touch $outfile
echo
num_passed=0
announce() {
echo >> $outfile
echo "================================================================" >> $outfile
echo "$@" >> $outfile
echo >> $outfile
}
mention() {
echo >> $outfile
echo ---------------------------------------------------------------- "$@" >> $outfile
}
run_mlr() {
# Use just "mlr" for info messages
echo mlr "$@"
echo mlr "$@" >> $outfile
# Use path to mlr for invoking the command
$path_to_mlr "$@" >> $outfile
echo >> $outfile
# since set -e
num_passed=`expr $num_passed + 1`
}
mlr_expect_fail() {
# Use just "mlr" for info messages
echo mlr "$@"
echo mlr "$@" >> $outfile
# Use path to mlr for invoking the command
set +e
$path_to_mlr "$@" >> $outfile 2>&1
status=$?
if [ $status -ne 1 ]; then
echo "Exit status was $status; expected 1."
echo "Exit status was $status; expected 1." >> $outfile
fi
set -e
echo >> $outfile
test $status -eq 1
# since set -e
num_passed=`expr $num_passed + 1`
}
# ================================================================
announce FUNC PROHIBITS
mlr_expect_fail --from $indir/abixy put '
func f(x,y,z) {
return $a # cannot reference srecs from functions
}
'
mlr_expect_fail --from $indir/abixy put '
func f(x,y,z) {
return $[x] # cannot reference srecs from functions
}
'
run_mlr -n put ''
# ================================================================
cat $outfile
if [ "$do_diff" = "true" ]; then
echo
diff -I '^mlr ' -C5 $expfile $outfile
echo diff OK # since set -e
echo ALL REGRESSION TESTS PASSED
echo Tests completed: $num_passed
fi

58841
go/reg_test/expected/out Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,695 @@
================================================================
OLD NULL-HANDLING
---------------------------------------------------------------- ok
mlr put $z = $x + $y ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,z=3
x=1,y=,s=,z=
x=,y=,s=hurrah,z=
---------------------------------------------------------------- ok
mlr put $z = $y + $y ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,z=4
x=1,y=,s=,z=
x=,y=,s=hurrah,z=
---------------------------------------------------------------- FIXME FOR SRECS
mlr put $z = $x + $nosuch ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,z=1
x=1,y=,s=,z=1
x=,y=,s=hurrah,z=
---------------------------------------------------------------- ok
mlr put $t = sub($s, "ell", "X") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=hXo
x=1,y=,s=,t=
x=,y=,s=hurrah,t=hurrah
---------------------------------------------------------------- ok
mlr put $t = sub($s, "ell", "") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=ho
x=1,y=,s=,t=
x=,y=,s=hurrah,t=hurrah
---------------------------------------------------------------- ok
mlr put $t = sub($nosuch, "ell", "X") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=
x=1,y=,s=,t=
x=,y=,s=hurrah,t=
---------------------------------------------------------------- ok
mlr put $t = gsub($s, "l", "X") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=heXXo
x=1,y=,s=,t=
x=,y=,s=hurrah,t=hurrah
---------------------------------------------------------------- ok
mlr put $t = gsub($s, "l", "") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=heo
x=1,y=,s=,t=
x=,y=,s=hurrah,t=hurrah
---------------------------------------------------------------- ok
mlr put $t = gsub($nosuch, "l", "X") ./reg_test/input/null-vs-empty.dkvp
x=1,y=2,s=hello,t=
x=1,y=,s=,t=
x=,y=,s=hurrah,t=
================================================================
NULLITY PREDICATES
mlr --opprint filter isnull($x) ./reg_test/input/nullvals.dkvp
a x y z
b - 6 -
b - - -
mlr --opprint filter isnull($y) ./reg_test/input/nullvals.dkvp
a x y z
b 5 - -
b - - -
mlr --opprint filter isnull($z) ./reg_test/input/nullvals.dkvp
a x y z
b 1 2 -
b 3 4 -
b 5 - -
b - 6 -
b - - -
mlr --opprint filter isnull($nosuch) ./reg_test/input/nullvals.dkvp
a x y z
b 1 2 -
b 3 4 -
b 5 - -
b - 6 -
b - - -
mlr --opprint filter isnotnull($x) ./reg_test/input/nullvals.dkvp
a x y z
b 1 2 -
b 3 4 -
b 5 - -
mlr --opprint filter isnotnull($y) ./reg_test/input/nullvals.dkvp
a x y z
b 1 2 -
b 3 4 -
b - 6 -
mlr --opprint filter isnotnull($z) ./reg_test/input/nullvals.dkvp
mlr --opprint filter isnotnull($nosuch) ./reg_test/input/nullvals.dkvp
mlr --opprint put $f=isnull($x) ./reg_test/input/nullvals.dkvp
a x y z f
b 1 2 - false
b 3 4 - false
b 5 - - false
b - 6 - true
b - - - true
mlr --opprint put $f=isnull($y) ./reg_test/input/nullvals.dkvp
a x y z f
b 1 2 - false
b 3 4 - false
b 5 - - true
b - 6 - false
b - - - true
mlr --opprint put $f=isnull($z) ./reg_test/input/nullvals.dkvp
a x y z f
b 1 2 - true
b 3 4 - true
b 5 - - true
b - 6 - true
b - - - true
mlr --opprint put $f=isnull($nosuch) ./reg_test/input/nullvals.dkvp
a x y z f
b 1 2 - true
b 3 4 - true
b 5 - - true
b - 6 - true
b - - - true
mlr --opprint put $f=isnotnull($x) ./reg_test/input/nullvals.dkvp
a x y z f
b 1 2 - true
b 3 4 - true
b 5 - - true
b - 6 - false
b - - - false
mlr --opprint put $f=isnotnull($y) ./reg_test/input/nullvals.dkvp
a x y z f
b 1 2 - true
b 3 4 - true
b 5 - - false
b - 6 - true
b - - - false
mlr --opprint put $f=isnotnull($z) ./reg_test/input/nullvals.dkvp
a x y z f
b 1 2 - false
b 3 4 - false
b 5 - - false
b - 6 - false
b - - - false
mlr --opprint put $f=isnotnull($nosuch) ./reg_test/input/nullvals.dkvp
a x y z f
b 1 2 - false
b 3 4 - false
b 5 - - false
b - 6 - false
b - - - false
================================================================
TRI-SPLIT-NULL HANDLING
---------------------------------------------------------------- ok
mlr put -q @sum += $x; end{emitp @sum} ./reg_test/input/abixy
sum=4.536294
---------------------------------------------------------------- ok
mlr put -q @sum[$a] += $x; end{emitp @sum, "a"} ./reg_test/input/abixy
a=pan,sum=0.849416
a=eks,sum=1.751863
a=wye,sum=0.777892
a=zee,sum=1.125680
a=hat,sum=0.031442
---------------------------------------------------------------- ok
mlr put $nonesuch = @nonesuch ./reg_test/input/abixy
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,nonesuch=
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,nonesuch=
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,nonesuch=
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,nonesuch=
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729,nonesuch=
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,nonesuch=
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694,nonesuch=
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006,nonesuch=
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,nonesuch=
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,nonesuch=
---------------------------------------------------------------- ok
mlr put -q @sum += $x; end{emitp @sum} ./reg_test/input/abixy-het
sum=3.963005
---------------------------------------------------------------- ok
mlr put -q @sum[$a] += $x; end{emitp @sum, "a"} ./reg_test/input/abixy-het
a=pan,sum=0.849416
a=eks,sum=1.751863
a=wye,sum=
a=zee,sum=1.125680
---------------------------------------------------------------- ok
mlr put $nonesuch = @nonesuch ./reg_test/input/abixy-het
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,nonesuch=
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,nonesuch=
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,nonesuch=
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,nonesuch=
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,nonesuch=
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,nonesuch=
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,nonesuch=
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,nonesuch=
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,nonesuch=
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,nonesuch=
mlr put -q @sum += $x; @sumtype = typeof(@sum); @xtype = typeof($x); emitf @sumtype, @xtype, @sum; end{emitp @sum} ./reg_test/input/abixy
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=0.346790
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=1.105470
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=1.310073
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=1.691473
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=2.264762
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=2.791888
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=3.403672
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=4.002226
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=4.033668
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=4.536294
sum=4.536294
mlr put -q @sum += $x; @sumtype = typeof(@sum); @xtype = typeof($x); emitf @sumtype, @xtype, @sum; end{emitp @sum} ./reg_test/input/abixy-het
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=0.346790
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=1.105470
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=1.310073
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=1.691473
sumtype=MT_FLOAT,xtype=MT_ABSENT,sum=1.691473
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=2.218599
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=2.830383
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=3.428937
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=3.460379
sumtype=MT_FLOAT,xtype=MT_FLOAT,sum=3.963005
sum=3.963005
mlr put $z = $x + $y ./reg_test/input/typeof.dkvp
x=1,y=2,z=3
x=1,y=,z=
x=,y=2,z=
x=,y=,z=
mlr put $z = $x + $y ./reg_test/input/typeof.dkvp
x=1,y=2,z=3
x=1,y=,z=
x=,y=2,z=
x=,y=,z=
mlr put $z = $x + $u ./reg_test/input/typeof.dkvp
x=1,y=2,z=1
x=1,y=,z=1
x=,y=2,z=
x=,y=,z=
mlr put @s = @s + $y; emitp @s ./reg_test/input/typeof.dkvp
s=2
x=1,y=2
s=
x=1,y=
s=
x=,y=2
s=
x=,y=
mlr put @s = @s + $y; emitp @s ./reg_test/input/typeof.dkvp
s=2
x=1,y=2
s=
x=1,y=
s=
x=,y=2
s=
x=,y=
mlr put @s = @s + $u; emitp @s ./reg_test/input/typeof.dkvp
s=
x=1,y=2
s=
x=1,y=
s=
x=,y=2
s=
x=,y=
mlr put $z = $x + $y; $x=typeof($x);$y=typeof($y);$z=typeof($z) ./reg_test/input/typeof.dkvp
x=MT_INT,y=MT_INT,z=MT_INT
x=MT_INT,y=MT_VOID,z=MT_VOID
x=MT_VOID,y=MT_INT,z=MT_VOID
x=MT_VOID,y=MT_VOID,z=MT_VOID
mlr put $z = $x + $y; $x=typeof($x);$y=typeof($y);$z=typeof($z) ./reg_test/input/typeof.dkvp
x=MT_INT,y=MT_INT,z=MT_INT
x=MT_INT,y=MT_VOID,z=MT_VOID
x=MT_VOID,y=MT_INT,z=MT_VOID
x=MT_VOID,y=MT_VOID,z=MT_VOID
mlr put $z = $x + $u; $x=typeof($x);$y=typeof($y);$z=typeof($z) ./reg_test/input/typeof.dkvp
x=MT_INT,y=MT_INT,z=MT_INT
x=MT_INT,y=MT_VOID,z=MT_INT
x=MT_VOID,y=MT_INT,z=MT_VOID
x=MT_VOID,y=MT_VOID,z=MT_VOID
mlr put @s = @s + $y; $x=typeof($x);$y=typeof($y);$z=typeof($z);$s=typeof(@s) ./reg_test/input/typeof.dkvp
x=MT_INT,y=MT_INT,z=MT_ABSENT,s=MT_INT
x=MT_INT,y=MT_VOID,z=MT_ABSENT,s=MT_VOID
x=MT_VOID,y=MT_INT,z=MT_ABSENT,s=MT_VOID
x=MT_VOID,y=MT_VOID,z=MT_ABSENT,s=MT_VOID
mlr put @s = @s + $y; $x=typeof($x);$y=typeof($y);$z=typeof($z);$s=typeof(@s) ./reg_test/input/typeof.dkvp
x=MT_INT,y=MT_INT,z=MT_ABSENT,s=MT_INT
x=MT_INT,y=MT_VOID,z=MT_ABSENT,s=MT_VOID
x=MT_VOID,y=MT_INT,z=MT_ABSENT,s=MT_VOID
x=MT_VOID,y=MT_VOID,z=MT_ABSENT,s=MT_VOID
mlr put @s = @s + $u; $x=typeof($x);$y=typeof($y);$z=typeof($z);$s=typeof(@s) ./reg_test/input/typeof.dkvp
x=MT_INT,y=MT_INT,z=MT_ABSENT,s=MT_VOID
x=MT_INT,y=MT_VOID,z=MT_ABSENT,s=MT_VOID
x=MT_VOID,y=MT_INT,z=MT_ABSENT,s=MT_VOID
x=MT_VOID,y=MT_VOID,z=MT_ABSENT,s=MT_VOID
================================================================
ABSENT-HANDLING
---------------------------------------------------------------- FIXME FOR SRECS
mlr put $a = $a * 2 ./reg_test/input/absent.dkvp
a=2,b=2
a=,b=4
x=,b=6,a=2
a=14,b=8
---------------------------------------------------------------- FIXME FOR SRECS
mlr put $new = $a * 2 ./reg_test/input/absent.dkvp
a=1,b=2,new=2
a=,b=4,new=
x=,b=6,new=2
a=7,b=8,new=14
---------------------------------------------------------------- ok for oosvars
mlr put $new = @nonesuch * 2 ./reg_test/input/absent.dkvp
a=1,b=2,new=2
a=,b=4,new=2
x=,b=6,new=2
a=7,b=8,new=2
---------------------------------------------------------------- ok
mlr put begin {@somesuch = 10 }; $new = @somesuch * 2 ./reg_test/input/absent.dkvp
a=1,b=2,new=20
a=,b=4,new=20
x=,b=6,new=20
a=7,b=8,new=20
---------------------------------------------------------------- FIXME FOR SRECS
mlr put $new = @nonesuch * $a ./reg_test/input/absent.dkvp
a=1,b=2,new=1
a=,b=4,new=
x=,b=6,new=
a=7,b=8,new=7
---------------------------------------------------------------- ok
mlr put begin {@somesuch = 10 }; $new = @somesuch * $a ./reg_test/input/absent.dkvp
a=1,b=2,new=10
a=,b=4,new=
x=,b=6,new=10
a=7,b=8,new=70
---------------------------------------------------------------- FIXME AND COMPARE TO ABOVE
mlr put @sum = @sum + $a; emit @sum; end { emit @sum } ./reg_test/input/absent.dkvp
sum=1
a=1,b=2
sum=
a=,b=4
sum=
x=,b=6
sum=
a=7,b=8
sum=
---------------------------------------------------------------- FIXME AND COMPARE TO ABOVE
mlr put @product = @product * $a; emit @product; end { emit @product } ./reg_test/input/absent.dkvp
product=1
a=1,b=2
product=
a=,b=4
product=
x=,b=6
product=
a=7,b=8
product=
---------------------------------------------------------------- FIXME AND COMPARE TO ABOVE
mlr put begin { @sum = 10 }; @sum = @sum + $a; emit @sum; end { emit @sum } ./reg_test/input/absent.dkvp
sum=11
a=1,b=2
sum=
a=,b=4
sum=
x=,b=6
sum=
a=7,b=8
sum=
---------------------------------------------------------------- FIXME AND COMPARE TO ABOVE
mlr put begin { @product = 10 }; @product = @product * $a; emit @product; end { emit @product } ./reg_test/input/absent.dkvp
product=10
a=1,b=2
product=
a=,b=4
product=
x=,b=6
product=
a=7,b=8
product=
================================================================
COMPARE OLD TESTS TO NEW
---------------------------------------------------------------- raw input
mlr cat ./reg_test/input/abixy-het
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
---------------------------------------------------------------- ok
mlr put -q @sum += $x; end{emitp @sum} ./reg_test/input/abixy-het
sum=3.963005
---------------------------------------------------------------- ok
mlr put -q @sum[$a] += $x; end{emitp @sum, "a"} ./reg_test/input/abixy-het
a=pan,sum=0.849416
a=eks,sum=1.751863
a=wye,sum=
a=zee,sum=1.125680
---------------------------------------------------------------- ok
mlr put $nonesuch = @nonesuch ./reg_test/input/abixy-het
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,nonesuch=
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,nonesuch=
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,nonesuch=
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,nonesuch=
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,nonesuch=
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,nonesuch=
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,nonesuch=
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,nonesuch=
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,nonesuch=
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,nonesuch=
---------------------------------------------------------------- raw input
mlr cat ./reg_test/input/absent.dkvp
a=1,b=2
a=,b=4
x=,b=6
a=7,b=8
---------------------------------------------------------------- FIXME AND COMPARE TO ABOVE
mlr put @sum = @sum + $a; emit @sum; end { emit @sum } ./reg_test/input/absent.dkvp
sum=1
a=1,b=2
sum=
a=,b=4
sum=
x=,b=6
sum=
a=7,b=8
sum=
---------------------------------------------------------------- FIXME AND COMPARE TO ABOVE
mlr put @product = @product * $a; emit @product; end { emit @product } ./reg_test/input/absent.dkvp
product=1
a=1,b=2
product=
a=,b=4
product=
x=,b=6
product=
a=7,b=8
product=
---------------------------------------------------------------- FIXME AND COMPARE TO ABOVE
mlr put begin { @sum = 10 }; @sum = @sum + $a; emit @sum; end { emit @sum } ./reg_test/input/absent.dkvp
sum=11
a=1,b=2
sum=
a=,b=4
sum=
x=,b=6
sum=
a=7,b=8
sum=
---------------------------------------------------------------- FIXME AND COMPARE TO ABOVE
mlr put begin { @product = 10 }; @product = @product * $a; emit @product; end { emit @product } ./reg_test/input/absent.dkvp
product=10
a=1,b=2
product=
a=,b=4
product=
x=,b=6
product=
a=7,b=8
product=
---------------------------------------------------------------- COMPARE
mlr put emit @sum; @sum += $x; emit @sum; end { emit @sum } ./reg_test/input/abixy-het
sum=0.346790
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
sum=0.346790
sum=1.105470
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
sum=1.105470
sum=1.310073
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
sum=1.310073
sum=1.691473
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
sum=1.691473
sum=1.691473
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
sum=1.691473
sum=2.218599
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
sum=2.218599
sum=2.830383
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694
sum=2.830383
sum=3.428937
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006
sum=3.428937
sum=3.460379
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
sum=3.460379
sum=3.963005
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864
sum=3.963005
---------------------------------------------------------------- COMPARE
mlr put emit @sum; @sum += $a; emit @sum; end { emit @sum } ./reg_test/input/absent.dkvp
sum=1
a=1,b=2
sum=1
sum=
a=,b=4
sum=
sum=
x=,b=6
sum=
sum=
a=7,b=8
sum=
mlr put emit @sum; $ostype=typeof(@sum);$xtype=typeof($x);@sum += $x; $nstype=typeof(@sum);emit @sum; end { emit @sum } ./reg_test/input/abixy-het
sum=0.346790
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533,ostype=MT_UNINIT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=0.346790
sum=1.105470
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797,ostype=MT_FLOAT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=1.105470
sum=1.310073
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776,ostype=MT_FLOAT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=1.310073
sum=1.691473
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463,ostype=MT_FLOAT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=1.691473
sum=1.691473
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729,ostype=MT_FLOAT,xtype=MT_ABSENT,nstype=MT_FLOAT
sum=1.691473
sum=2.218599
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697,ostype=MT_FLOAT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=2.218599
sum=2.830383
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694,ostype=MT_FLOAT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=2.830383
sum=3.428937
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006,ostype=MT_FLOAT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=3.428937
sum=3.460379
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059,ostype=MT_FLOAT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=3.460379
sum=3.963005
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864,ostype=MT_FLOAT,xtype=MT_FLOAT,nstype=MT_FLOAT
sum=3.963005
mlr put emit @sum; $ostype=typeof(@sum);$atype=typeof($a);@sum += $a; $nstype=typeof(@sum);emit @sum; end { emit @sum } ./reg_test/input/absent.dkvp
sum=1
a=1,b=2,ostype=MT_UNINIT,atype=MT_INT,nstype=MT_INT
sum=1
sum=
a=,b=4,ostype=MT_INT,atype=MT_VOID,nstype=MT_VOID
sum=
sum=
x=,b=6,ostype=MT_VOID,atype=MT_ABSENT,nstype=MT_VOID
sum=
sum=
a=7,b=8,ostype=MT_VOID,atype=MT_INT,nstype=MT_VOID
sum=
================================================================
NARROW IN
----------------------------------------------------------------
mlr cat
x=1
x=
x=7
mlr put $osum=@sum; $ostype=typeof(@sum);$xtype=typeof($x);@sum += $x; $nstype=typeof(@sum);$nsum=@sum; end { emit @sum }
x=1,osum=,ostype=MT_UNINIT,xtype=MT_INT,nstype=MT_INT,nsum=1
x=,osum=1,ostype=MT_INT,xtype=MT_VOID,nstype=MT_VOID,nsum=
x=7,osum=,ostype=MT_VOID,xtype=MT_INT,nstype=MT_VOID,nsum=
sum=
----------------------------------------------------------------
mlr cat
x=1
xxx=
x=7
mlr put $osum=@sum; $ostype=typeof(@sum);$xtype=typeof($x);@sum += $x; $nstype=typeof(@sum);$nsum=@sum; end { emit @sum }
x=1,osum=,ostype=MT_UNINIT,xtype=MT_INT,nstype=MT_INT,nsum=1
xxx=,osum=1,ostype=MT_INT,xtype=MT_ABSENT,nstype=MT_INT,nsum=1
x=7,osum=1,ostype=MT_INT,xtype=MT_INT,nstype=MT_INT,nsum=8
sum=8
----------------------------------------------------------------
mlr cat
x=1
x=
y=
x=7
mlr --ofs tab put $xtype=typeof($x);$sum = $x + 10; $stype=typeof($sum)
x=1 xtype=MT_INT sum=11 stype=MT_INT
x= xtype=MT_VOID sum= stype=MT_VOID
y= xtype=MT_ABSENT sum=10 stype=MT_INT
x=7 xtype=MT_INT sum=17 stype=MT_INT

3
go/reg_test/input/a.csv Normal file
View file

@ -0,0 +1,3 @@
a,b,c
1,2,3
4,5,6
1 a b c
2 1 2 3
3 4 5 6

View file

@ -0,0 +1,3 @@
a b c
1 2 3
4 5 6

10
go/reg_test/input/abixy Normal file
View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
aaa=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,bbb=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=wye,b=pan,i=5,xxx=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=eks,b=zee,iii=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,x=0.5985540091064224,yyy=0.976181385699006
aaa=hat,bbb=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

2000
go/reg_test/input/abixy-wide Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,20 @@
a=cat,b=pan,i=1,x=0.5117389009583777,y=0.08295224980036853,x2=0.2618767027540883,xy=0.0424498931448654,y2=0.006881075746942741
a=pan,b=wye,i=2,x=0.5225940442098578,y=0.511678736087022,x2=0.27310453504361476,xy=0.2674002600279053,y2=0.26181512896361225
a=wye,b=cat,i=3,x=0.8150401717873625,y=0.07989551500795256,x2=0.6642904816271734,xy=0.06511805427712146,y2=0.006383293318385972
a=dog,b=hat,i=4,x=0.4488733555675044,y=0.5730530513123552,x2=0.20148728933843124,xy=0.25722824606077416,y2=0.32838979961840076
a=dog,b=pan,i=5,x=0.2946557960430134,y=0.6850437256584863,x2=0.08682203814174191,xy=0.20185210430817294,y2=0.46928490606405937
a=wye,b=cat,i=6,x=0.048709182664292916,y=0.5851879044762575,x2=0.0023725844758234536,xy=0.02850402453206882,y2=0.34244488354531344
a=dog,b=hat,i=7,x=0.8500003149528544,y=0.2984098741712895,x2=0.7225005354199517,xy=0.25364848703063775,y2=0.08904845300292483
a=pan,b=pan,i=8,x=0.616507208914765,y=0.25924335982487057,x2=0.38008113864387366,xy=0.15982540019531707,y2=0.06720711961328732
a=hat,b=hat,i=9,x=0.33786884067769307,y=0.6036735617015514,x2=0.11415535350088835,xy=0.203962486439877,y2=0.3644217690974368
a=wye,b=hat,i=10,x=0.3834648944206174,y=0.4999709279216641,x2=0.14704532525301522,xy=0.19172129908885902,y2=0.24997092876684981
a=pan,b=hat,i=11,x=0.025474999754416028,y=0.7861954915044592,x2=0.0006489756124874967,xy=0.020028329952999087,y2=0.6181033508619382
a=cat,b=hat,i=12,x=0.6335445699880142,y=0.15467178563525052,x2=0.4013787221612979,xy=0.0979914699195631,y2=0.02392336127159689
a=hat,b=wye,i=13,x=0.35922068401384877,y=0.8502678133887914,x2=0.1290394998233774,xy=0.30543378552048117,y2=0.7229553544849566
a=dog,b=dog,i=14,x=0.5440047442770544,y=0.933608851612059,x2=0.2959411617959433,xy=0.5078876445760125,y2=0.8716254878083876
a=wye,b=dog,i=15,x=0.4689175303764642,y=0.09048353045392021,x2=0.21988365029436224,xy=0.04242931364019586,y2=0.008187269283405506
a=pan,b=pan,i=16,x=0.3959177828066379,y=0.6339858483805666,x2=0.15675089074252413,xy=0.25100627142161924,y2=0.4019380559468268
a=dog,b=hat,i=17,x=0.34033844788864975,y=0.8845934733681523,x2=0.11583025911125516,xy=0.3010611697385466,y2=0.782505613125532
a=wye,b=wye,i=18,x=0.6770613653962891,y=0.896307226056897,x2=0.4584120925122874,xy=0.6068549942886431,y2=0.8033666434818095
a=dog,b=wye,i=19,x=0.4865373244199632,y=0.44117766146315884,x2=0.23671856805373653,xy=0.2146493990021416,y2=0.1946377289741016
a=dog,b=dog,i=20,x=0.3223311725542929,y=0.08115611029827985,x2=0.10389738480022534,xy=0.026159144192390068,y2=0.006586314238746564

View file

@ -0,0 +1,11 @@
a,b,i,x,y
pan,pan,1,0.3467901443380824,0.7268028627434533
eks,pan,2,0.7586799647899636,0.5221511083334797
wye,wye,3,0.20460330576630303,0.33831852551664776
eks,wye,4,0.38139939387114097,0.13418874328430463
wye,pan,5,0.5732889198020006,0.8636244699032729
zee,pan,6,0.5271261600918548,0.49322128674835697
eks,zee,7,0.6117840605678454,0.1878849191181694
zee,wye,8,0.5985540091064224,0.976181385699006
hat,wye,9,0.03144187646093577,0.7495507603507059
pan,wye,10,0.5026260055412137,0.9526183602969864
1 a b i x y
2 pan pan 1 0.3467901443380824 0.7268028627434533
3 eks pan 2 0.7586799647899636 0.5221511083334797
4 wye wye 3 0.20460330576630303 0.33831852551664776
5 eks wye 4 0.38139939387114097 0.13418874328430463
6 wye pan 5 0.5732889198020006 0.8636244699032729
7 zee pan 6 0.5271261600918548 0.49322128674835697
8 eks zee 7 0.6117840605678454 0.1878849191181694
9 zee wye 8 0.5985540091064224 0.976181385699006
10 hat wye 9 0.03144187646093577 0.7495507603507059
11 pan wye 10 0.5026260055412137 0.9526183602969864

View file

@ -0,0 +1,10 @@
a=pan,b=pan,i=1,x=0.3467901443380824,y=0.7268028627434533
a=eks,b=pan,i=2,x=0.7586799647899636,y=0.5221511083334797
a=wye,b=wye,i=3,x=0.20460330576630303,y=0.33831852551664776
a=eks,b=wye,i=4,x=0.38139939387114097,y=0.13418874328430463
a=wye,b=pan,i=5,x=0.5732889198020006,y=0.8636244699032729
a=zee,b=pan,i=6,x=0.5271261600918548,y=0.49322128674835697
a=eks,b=zee,i=7,x=0.6117840605678454,y=0.1878849191181694
a=zee,b=wye,i=8,x=0.5985540091064224,y=0.976181385699006
a=hat,b=wye,i=9,x=0.03144187646093577,y=0.7495507603507059
a=pan,b=wye,i=10,x=0.5026260055412137,y=0.9526183602969864

View file

@ -0,0 +1,10 @@
{ "a": "pan", "b": "pan", "i": 1, "x": 0.3467901443380824, "y": 0.7268028627434533 }
{ "a": "eks", "b": "pan", "i": 2, "x": 0.7586799647899636, "y": 0.5221511083334797 }
{ "a": "wye", "b": "wye", "i": 3, "x": 0.20460330576630303, "y": 0.33831852551664776 }
{ "a": "eks", "b": "wye", "i": 4, "x": 0.38139939387114097, "y": 0.13418874328430463 }
{ "a": "wye", "b": "pan", "i": 5, "x": 0.5732889198020006, "y": 0.8636244699032729 }
{ "a": "zee", "b": "pan", "i": 6, "x": 0.5271261600918548, "y": 0.49322128674835697 }
{ "a": "eks", "b": "zee", "i": 7, "x": 0.6117840605678454, "y": 0.1878849191181694 }
{ "a": "zee", "b": "wye", "i": 8, "x": 0.5985540091064224, "y": 0.976181385699006 }
{ "a": "hat", "b": "wye", "i": 9, "x": 0.03144187646093577, "y": 0.7495507603507059 }
{ "a": "pan", "b": "wye", "i": 10, "x": 0.5026260055412137, "y": 0.9526183602969864 }

View file

@ -0,0 +1,12 @@
| a | b | i | x | y |
| --- | --- | --- | --- | --- |
| pan | pan | 1 | 0.3467901443380824 | 0.7268028627434533 |
| eks | pan | 2 | 0.7586799647899636 | 0.5221511083334797 |
| wye | wye | 3 | 0.20460330576630303 | 0.33831852551664776 |
| eks | wye | 4 | 0.38139939387114097 | 0.13418874328430463 |
| wye | pan | 5 | 0.5732889198020006 | 0.8636244699032729 |
| zee | pan | 6 | 0.5271261600918548 | 0.49322128674835697 |
| eks | zee | 7 | 0.6117840605678454 | 0.1878849191181694 |
| zee | wye | 8 | 0.5985540091064224 | 0.976181385699006 |
| hat | wye | 9 | 0.03144187646093577 | 0.7495507603507059 |
| pan | wye | 10 | 0.5026260055412137 | 0.9526183602969864 |

View file

@ -0,0 +1,10 @@
pan pan 1 0.3467901443380824 0.7268028627434533
eks pan 2 0.7586799647899636 0.5221511083334797
wye wye 3 0.20460330576630303 0.33831852551664776
eks wye 4 0.38139939387114097 0.13418874328430463
wye pan 5 0.5732889198020006 0.8636244699032729
zee pan 6 0.5271261600918548 0.49322128674835697
eks zee 7 0.6117840605678454 0.1878849191181694
zee wye 8 0.5985540091064224 0.976181385699006
hat wye 9 0.03144187646093577 0.7495507603507059
pan wye 10 0.5026260055412137 0.9526183602969864

View file

@ -0,0 +1,11 @@
a b i x y
pan pan 1 0.3467901443380824 0.7268028627434533
eks pan 2 0.7586799647899636 0.5221511083334797
wye wye 3 0.20460330576630303 0.33831852551664776
eks wye 4 0.38139939387114097 0.13418874328430463
wye pan 5 0.5732889198020006 0.8636244699032729
zee pan 6 0.5271261600918548 0.49322128674835697
eks zee 7 0.6117840605678454 0.1878849191181694
zee wye 8 0.5985540091064224 0.976181385699006
hat wye 9 0.03144187646093577 0.7495507603507059
pan wye 10 0.5026260055412137 0.9526183602969864

View file

@ -0,0 +1,11 @@
a b i x y
pan pan 1 0.3467901443380824 0.7268028627434533
eks pan 2 0.7586799647899636 0.5221511083334797
wye wye 3 0.20460330576630303 0.33831852551664776
eks wye 4 0.38139939387114097 0.13418874328430463
wye pan 5 0.5732889198020006 0.8636244699032729
zee pan 6 0.5271261600918548 0.49322128674835697
eks zee 7 0.6117840605678454 0.1878849191181694
zee wye 8 0.5985540091064224 0.976181385699006
hat wye 9 0.03144187646093577 0.7495507603507059
pan wye 10 0.5026260055412137 0.9526183602969864
1 a b i x y
2 pan pan 1 0.3467901443380824 0.7268028627434533
3 eks pan 2 0.7586799647899636 0.5221511083334797
4 wye wye 3 0.20460330576630303 0.33831852551664776
5 eks wye 4 0.38139939387114097 0.13418874328430463
6 wye pan 5 0.5732889198020006 0.8636244699032729
7 zee pan 6 0.5271261600918548 0.49322128674835697
8 eks zee 7 0.6117840605678454 0.1878849191181694
9 zee wye 8 0.5985540091064224 0.976181385699006
10 hat wye 9 0.03144187646093577 0.7495507603507059
11 pan wye 10 0.5026260055412137 0.9526183602969864

View file

@ -0,0 +1,59 @@
a pan
b pan
i 1
x 0.3467901443380824
y 0.7268028627434533
a eks
b pan
i 2
x 0.7586799647899636
y 0.5221511083334797
a wye
b wye
i 3
x 0.20460330576630303
y 0.33831852551664776
a eks
b wye
i 4
x 0.38139939387114097
y 0.13418874328430463
a wye
b pan
i 5
x 0.5732889198020006
y 0.8636244699032729
a zee
b pan
i 6
x 0.5271261600918548
y 0.49322128674835697
a eks
b zee
i 7
x 0.6117840605678454
y 0.1878849191181694
a zee
b wye
i 8
x 0.5985540091064224
y 0.976181385699006
a hat
b wye
i 9
x 0.03144187646093577
y 0.7495507603507059
a pan
b wye
i 10
x 0.5026260055412137
y 0.9526183602969864

View file

@ -0,0 +1,4 @@
a=1,b=2
a=,b=4
x=,b=6
a=7,b=8

View file

@ -0,0 +1,6 @@
{"a":1,"b":1}
{"a":2,"b":[2,3]}
{"a":3,"b":{"c":[4,5]}}
{"a":4,"b":{"c":{"d":[4,5]}}}
{"a":5,"b":[6,7,[8,9]]}
{"a":6,"b":[[[11]]]}

2
go/reg_test/input/b.csv Normal file
View file

@ -0,0 +1,2 @@
d,e,f
5,6,7
1 d e f
2 5 6 7

View file

@ -0,0 +1,2 @@
d e f
5 6 7

View file

@ -0,0 +1,3 @@
"a","b","c"
1,2,3
4,5,6
1 a b c
2 1 2 3
3 4 5 6

View file

@ -0,0 +1,3 @@
a,b,c
1,2,3
4,5,6
1 a b c
2 1 2 3
3 4 5 6

View file

@ -0,0 +1,3 @@
name.x,name.y,z
1,2,3
4,6,5
1 name.x name.y z
2 1 2 3
3 4 6 5

6
go/reg_test/input/c.csv Normal file
View file

@ -0,0 +1,6 @@
a,b,c
1,2,3
4,5,6
a,b,c
7,8,9
1 a b c
2 1 2 3
3 4 5 6
4 a b c
5 7 8 9

View file

@ -0,0 +1,6 @@
a b c
1 2 3
4 5 6
a b c
7 8 9

View file

@ -0,0 +1,13 @@
FIELD=
FIELD=a
FIELD=ab
FIELD=abc
FIELD=abcd
FIELD=abcde
FIELD=abcdef
FIELD=abcdefg
FIELD=abcdefgh
FIELD=abcdefghi
FIELD=abcdefghij
FIELD=abcdefghijk
FIELD=abcdefghijkl

View file

@ -0,0 +1,4 @@
FIELD=ABC123
FIELD=ABC..123
FIELD=..ABC..123..
FIELD=none of the above

View file

@ -0,0 +1,17 @@
n,a,b , c
1,xy,2,3
2,xy ,2,3
3,xy ,2,3
4,xy ,2,3
5,xy,2,3
6, xy,2,3
7, xy,2,3
8, xy,2,3
9,xy,2,3
10, xy ,2,3
11, xy ,2,3
12, xy ,2,3
13,,2,3
14, ,2,3
15, ,2,3
16, ,2,3
1 n a b c
2 1 xy 2 3
3 2 xy 2 3
4 3 xy 2 3
5 4 xy 2 3
6 5 xy 2 3
7 6 xy 2 3
8 7 xy 2 3
9 8 xy 2 3
10 9 xy 2 3
11 10 xy 2 3
12 11 xy 2 3
13 12 xy 2 3
14 13 2 3
15 14 2 3
16 15 2 3
17 16 2 3

View file

@ -0,0 +1,3 @@
a,b,c
1,2,3
4,5,
1 a b c
2 1 2 3
3 4 5

View file

@ -0,0 +1,3 @@
@@ hello world 1
a=1,b=2,c=3
a=4,b=5,c=6

View file

@ -0,0 +1,4 @@
# hello
a,b,c
1,2,3
4,5,6
1 # hello
2 a,b,c
3 1,2,3
4 4,5,6

View file

@ -0,0 +1,3 @@
# hello world 1
a=1,b=2,c=3
a=4,b=5,c=6

View file

@ -0,0 +1,3 @@
# hello world 1
{ "a":1, "b":2, "c":3 }
{ "a":4, "b":5, "c":6 }

View file

@ -0,0 +1,3 @@
# hello world 1
aX1 bX2 cX3
aX4 bX5 cX6

View file

@ -0,0 +1,8 @@
x 1
#hello world3
z 3
x 2
#hello world4
z 5

View file

@ -0,0 +1,3 @@
a=1,b=2,c=3
@@ hello world 2
a=4,b=5,c=6

View file

@ -0,0 +1,7 @@
# hello
a,b,c
# hi
1,2,3
# there
4,5,6
# haha
1 # hello
2 a,b,c
3 # hi
4 1,2,3
5 # there
6 4,5,6
7 # haha

View file

@ -0,0 +1,3 @@
a=1,b=2,c=3
# hello world 2
a=4,b=5,c=6

View file

@ -0,0 +1,3 @@
{ "a":1, "b":2, "c":3 }
# hello world 2
{ "a":4, "b":5, "c":6 }

View file

@ -0,0 +1,3 @@
aX1 bX2 cX3
# hello world 2
aX4 bX5 cX6

View file

@ -0,0 +1,13 @@
#hello world1
#hello world2
x 1
#hello world3
z 3
x 2
#hello world4
z 5
#hello world5
#hello world6

View file

@ -0,0 +1,3 @@
a=1,b=2,c=3
a=4,b=5,c=6
@@ hello world 3

View file

@ -0,0 +1,3 @@
a=1,b=2,c=3
a=4,b=5,c=6
# hello world 3

View file

@ -0,0 +1,3 @@
{ "a":1, "b":2, "c":3 }
{ "a":4, "b":5, "c":6 }
# hello world 3

View file

@ -0,0 +1,3 @@
aX1 bX2 cX3
aX4 bX5 cX6
# hello world 3

5
go/reg_test/input/d.csv Normal file
View file

@ -0,0 +1,5 @@
h,i,j
3,4,5
m,n,o
8,9,10
1 h i j
2 3 4 5
3 m n o
4 8 9 10

View file

@ -0,0 +1,5 @@
h i j
3 4 5
m n o
8 9 10

View file

@ -0,0 +1,5 @@
Name,Date_201505,Extraneous
Alice,2015-05-14,foo
Bob,2015-05-11,bar
Chuck,2015-05-28,quux
Denise,2015-05-02,meep
1 Name Date_201505 Extraneous
2 Alice 2015-05-14 foo
3 Bob 2015-05-11 bar
4 Chuck 2015-05-28 quux
5 Denise 2015-05-02 meep

View file

@ -0,0 +1,5 @@
Name,Date_201506,Extraneous
Alice,2015-06-23,cafe
Denise,2015-06-17,feed
Chuck,2015-06-19,beef
Bob,2015-06-19,d00d
1 Name Date_201506 Extraneous
2 Alice 2015-06-23 cafe
3 Denise 2015-06-17 feed
4 Chuck 2015-06-19 beef
5 Bob 2015-06-19 d00d

View file

@ -0,0 +1,4 @@
text
hi
a.b
bye
1 text
2 hi
3 a.b
4 bye

View file

@ -0,0 +1,11 @@
a///b///i//x///////////////////y
pan/pan/1//0.3467901443380824//0.7268028627434533
eks/pan/2//0.7586799647899636//0.5221511083334797
wye/wye/3//0.20460330576630303/0.33831852551664776
eks/wye/4//0.38139939387114097/0.13418874328430463
wye/pan/5//0.5732889198020006//0.8636244699032729
zee/pan/6//0.5271261600918548//0.49322128674835697
eks/zee/7//0.6117840605678454//0.1878849191181694
zee/wye/8//0.5985540091064224//0.976181385699006
hat/wye/9//0.03144187646093577/0.7495507603507059
pan/wye/10/0.5026260055412137//0.9526183602969864

View file

@ -0,0 +1,6 @@
a.....1
b.....2
c.....345
defg..6
hi....78

View file

@ -0,0 +1,2 @@
a=pan,b=wy.e,c=3
a=pan,b=wy=e,c=3

4
go/reg_test/input/e.csv Normal file
View file

@ -0,0 +1,4 @@
a,b,c
1,2,3
4,5,6
1 a b c
2 1 2 3
3 4 5 6

View file

@ -0,0 +1,4 @@
a b c
1 2 3
4 5 6

View file

@ -0,0 +1,3 @@
a 1
b 2
c 3 4 5

View file

@ -0,0 +1,4 @@
#!/bin/sh
while read line; do
echo "[ZYX]=[$ZYX] $line"
done

View file

@ -0,0 +1,3 @@
name=X,x=1,y=2
name=Y,x=3,y=4
x=5,y=6

View file

@ -0,0 +1,2 @@
{"abc\bdef\fghi": "jkl\nmno\rpqr\tstu\"vw\\xyz"}
{"abc\bdef\fghi": "jkl\nmno\rpqr\tstu\"vw\\\\xyz"}

View file

@ -0,0 +1 @@
a␟b␟c␞d␟e␟f␞g␟h␟i

0
go/reg_test/input/f.csv Normal file
View file

View file

View file

@ -0,0 +1,4 @@
a,b,c
1,,3
4,5,6
7,,9
1 a b c
2 1 3
3 4 5 6
4 7 9

View file

@ -0,0 +1 @@
$x < $y

View file

@ -0,0 +1 @@
$x > 0.5

View file

@ -0,0 +1 @@
&& $i < 5

View file

@ -0,0 +1,17 @@
a=apple,b=apple
a=apple,b=apple
a=apple,b=apple
a=apple,b=apple
a=apple,b=apple
a=apple,b=apple
a=bat,b=cat
a=bat,b=cat
a=bat,b=cat
a=bat,b=cat
a=bat,b=cat
a=cat,b=bat
a=cat,b=bat
a=cat,b=bat
a=cat,b=cat
a=dog,b=dog
a=dog,b=dog

View file

@ -0,0 +1,7 @@
x,g
100,red
203,red
101,green
307,red
209,green
314,green
1 x g
2 100 red
3 203 red
4 101 green
5 307 red
6 209 green
7 314 green

View file

@ -0,0 +1,28 @@
sec=0.25
sec=1.25
sec=59.25
sec=60.25
sec=61.25
sec=3599.25
sec=3600.25
sec=3601.25
sec=86399.25
sec=86400.25
sec=86401.25
sec=863999.25
sec=864000.25
sec=864001.25
sec=-0.25
sec=-1.25
sec=-59.25
sec=-60.25
sec=-61.25
sec=-3599.25
sec=-3600.25
sec=-3601.25
sec=-86399.25
sec=-86400.25
sec=-86401.25
sec=-863999.25
sec=-864000.25
sec=-864001.25

5
go/reg_test/input/g.csv Normal file
View file

@ -0,0 +1,5 @@

View file

@ -0,0 +1,5 @@

29
go/reg_test/input/gmt2sec Normal file
View file

@ -0,0 +1,29 @@
gmt
1970-01-01T00:00:00Z
1970-01-01T00:00:00.Z
1970-01-01T00:00:01Z
1970-01-01T00:00:01.0Z
1970-01-01T00:00:10Z
1970-01-01T00:00:10.00Z
1970-01-01T00:01:40Z
1970-01-01T00:01:40.1Z
1970-01-01T00:16:40Z
1970-01-01T00:16:40.12Z
1970-01-01T02:46:40Z
1970-01-01T02:46:40.123Z
1970-01-02T03:46:40Z
1970-01-02T03:46:40.1234Z
1970-01-12T13:46:40Z
1970-01-12T13:46:40.12345Z
1970-04-26T17:46:40Z
1970-04-26T17:46:40.123456Z
1973-03-03T09:46:40Z
1973-03-03T09:46:40.1234567Z
2001-09-09T01:46:40Z
2001-09-09T01:46:40.12345678Z
2015-05-19T11:49:40Z
2015-05-19T11:49:40.123456789Z
2017-07-14T02:40:00Z
2017-07-14T02:40:00.999Z
2033-05-18T03:33:20Z
2033-05-18T03:33:20.999999Z

View file

@ -0,0 +1,6 @@
x=lmnop
x=abcdefg
x=ababbabbba
x=LMNOP
x=ABCDEFG
x=ABABBABBBA

View file

@ -0,0 +1,6 @@
abc=1,def=11
ABC=2,DEF=12
abcd=3,ghi=13
ABCD=4,GHI=14
abcde=5,ghi=15
ABCDE=6,GHI=16

View file

@ -0,0 +1,10 @@
x=100,b=10
l=1,b=11
l=1,b=12
x=200,b=13
l=3,b=14
l=3,b=15
x=300,b=16
l=5,b=17
l=5,b=18
x=400,b=19

View file

@ -0,0 +1,3 @@
y=111
r=0
y=333

View file

@ -0,0 +1,3 @@
y=111
r=1
y=333

View file

@ -0,0 +1,5 @@
y=111
r=1
y=222
r=1
y=333

View file

@ -0,0 +1,5 @@
y=111
r=1
y=222
r=2
y=333

View file

@ -0,0 +1,5 @@
y=111
r=1
y=222
r=3
y=333

View file

@ -0,0 +1,5 @@
y=111
r=1
y=222
r=4
y=333

View file

@ -0,0 +1,5 @@
y=111
r=1
y=222
r=5
y=333

View file

@ -0,0 +1,5 @@
y=111
r=1
y=222
r=6
y=333

View file

@ -0,0 +1,3 @@
y=111
r=2
y=333

View file

@ -0,0 +1,5 @@
y=111
r=2
y=222
r=2
y=333

View file

@ -0,0 +1,5 @@
y=111
r=2
y=222
r=3
y=333

View file

@ -0,0 +1,5 @@
y=111
r=2
y=222
r=4
y=333

View file

@ -0,0 +1,5 @@
y=111
r=2
y=222
r=5
y=333

View file

@ -0,0 +1,5 @@
y=111
r=2
y=222
r=6
y=333

View file

@ -0,0 +1,3 @@
y=111
r=3
y=333

View file

@ -0,0 +1,5 @@
y=111
r=3
y=222
r=3
y=333

View file

@ -0,0 +1,5 @@
y=111
r=3
y=222
r=4
y=333

View file

@ -0,0 +1,5 @@
y=111
r=3
y=222
r=5
y=333

View file

@ -0,0 +1,5 @@
y=111
r=3
y=222
r=6
y=333

View file

@ -0,0 +1,3 @@
y=111
r=4
y=333

View file

@ -0,0 +1,5 @@
y=111
r=4
y=222
r=4
y=333

View file

@ -0,0 +1,5 @@
y=111
r=4
y=222
r=5
y=333

View file

@ -0,0 +1,5 @@
y=111
r=4
y=222
r=6
y=333

View file

@ -0,0 +1,3 @@
y=111
r=5
y=333

Some files were not shown because too many files have changed in this diff Show more