From fc728cccb8a91e280e4c9b572cf54d8b59dfb341 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Tue, 12 Apr 2016 09:08:58 -0400 Subject: [PATCH] UT absent-valued filter/cond --- c/reg_test/expected/out | 16 ++++++++++++++++ c/reg_test/run | 10 ++++++++++ c/todo.txt | 18 +----------------- 3 files changed, 27 insertions(+), 17 deletions(-) diff --git a/c/reg_test/expected/out b/c/reg_test/expected/out index 1c6eb2e95..56f508137 100644 --- a/c/reg_test/expected/out +++ b/c/reg_test/expected/out @@ -9436,6 +9436,22 @@ b 5 - - false b - 6 - false b - - - false +mlr put filter @nonesuch ./reg_test/input/abixy + +mlr put filter @nonesuch==true ./reg_test/input/abixy + +mlr put filter $nonesuch==true ./reg_test/input/abixy + +mlr put filter $nonesuch ./reg_test/input/abixy + +mlr put -q @v=1; @nonesuch {emit @v} ./reg_test/input/abixy + +mlr put -q @v=1; @nonesuch==true {emit @v} ./reg_test/input/abixy + +mlr put -q @v=1; $nonesuch {emit @v} ./reg_test/input/abixy + +mlr put -q @v=1; $nonesuch==true {emit @v} ./reg_test/input/abixy + ================================================================ DSL TYPE-INFERENCE diff --git a/c/reg_test/run b/c/reg_test/run index b00bb1ec8..eaac7acbf 100755 --- a/c/reg_test/run +++ b/c/reg_test/run @@ -907,6 +907,16 @@ run_mlr --opprint put '$f=isnotnull($y)' $indir/nullvals.dkvp run_mlr --opprint put '$f=isnotnull($z)' $indir/nullvals.dkvp run_mlr --opprint put '$f=isnotnull($nosuch)' $indir/nullvals.dkvp +run_mlr put 'filter @nonesuch' $indir/abixy +run_mlr put 'filter @nonesuch==true' $indir/abixy +run_mlr put 'filter $nonesuch==true' $indir/abixy +run_mlr put 'filter $nonesuch' $indir/abixy + +run_mlr put -q '@v=1; @nonesuch {emit @v}' $indir/abixy +run_mlr put -q '@v=1; @nonesuch==true {emit @v}' $indir/abixy +run_mlr put -q '@v=1; $nonesuch {emit @v}' $indir/abixy +run_mlr put -q '@v=1; $nonesuch==true {emit @v}' $indir/abixy + # ---------------------------------------------------------------- announce DSL TYPE-INFERENCE diff --git a/c/todo.txt b/c/todo.txt index c30b6c773..d8ca34b7a 100644 --- a/c/todo.txt +++ b/c/todo.txt @@ -8,8 +8,7 @@ BUGFIXES ================================================================ TOP-OF-LIST SUMMARY -! entirely rework null-data section @ mld -! manify?/mldify! mlr --print-type-arithmetic-info +! entirely rework null-data section @ mld; manify?/mldify! mlr --print-type-arithmetic-info ! valgrinds * UT behavior for null-valued filter / cond-block (see below) ! do absent-identity for logical, bitwise, and exp? UTs for all regardless of what changes/doesn't. @@ -53,21 +52,6 @@ TOP-OF-LIST SUMMARY - double-backslashing bug in sub/gsub - --from, & why: up-arrow & append then-chain -================================================================ -UT: - -* define/test behavior for null-valued filter / cond-block - - mlr put 'filter @nonesuch' ../data/small - mlr put 'filter @nonesuch==true' ../data/small - mlr put 'filter $nonesuch==true' ../data/small - mlr put 'filter $nonesuch' ../data/small - - mlr put -q '@v=1; @nonesuch { emit @v}' ../data/small - mlr put -q '@v=1; @nonesuch==true { emit @v}' ../data/small - mlr put -q '@v=1; $nonesuch { emit @v}' ../data/small - mlr put -q '@v=1; $nonesuch==true { emit @v}' ../data/small - ================================================================ OOSVAR EXPERIMENTS: