From e4bb5c78c757de0ec024d8e0f3633403c8fabd54 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Sun, 25 Sep 2016 23:12:32 -0400 Subject: [PATCH] seqgen UT --- c/reg_test/expected/out | 38 ++++++++++++++++++++++++++++++++++++++ c/reg_test/run | 11 +++++++++++ c/todo.txt | 1 - 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/c/reg_test/expected/out b/c/reg_test/expected/out index c38a81fc3..8fc6bf4db 100644 --- a/c/reg_test/expected/out +++ b/c/reg_test/expected/out @@ -3186,6 +3186,44 @@ a=4,y=d=70 b=5,y=d=70 +================================================================ +SEQGEN + +mlr seqgen --start 1 --stop 5 --step 1 +i=1 +i=2 +i=3 +i=4 +i=5 + +mlr seqgen --start 1 --stop 5 --step 2 +i=1 +i=3 +i=5 + +mlr seqgen --start 1 --stop 1 --step 1 -f a +a=1 + +mlr seqgen --start 5 --stop 1 --step 1 -f b + +mlr seqgen --start 5 --stop 1 --step -1 -f c +c=5 +c=4 +c=3 +c=2 +c=1 + +mlr seqgen --start 5 --stop 5 --step -1 -f d +d=5 + +mlr --from ./reg_test/input/abixy cat then seqgen --start 1 --stop 5 +i=1 +i=2 +i=3 +i=4 +i=5 + + ================================================================ STATS diff --git a/c/reg_test/run b/c/reg_test/run index 957349bd7..ec0bc86da 100755 --- a/c/reg_test/run +++ b/c/reg_test/run @@ -489,6 +489,17 @@ run_mlr nest --explode --pairs --across-fields -f x --nested-fs pipe --nested- run_mlr nest --explode --pairs --across-records -f x $indir/nest-explode.dkvp run_mlr nest --explode --pairs --across-records -f x --nested-fs pipe --nested-ps = $indir/nest-explode-vary-fs-ps.dkvp +# ---------------------------------------------------------------- +announce SEQGEN + +run_mlr seqgen --start 1 --stop 5 --step 1 +run_mlr seqgen --start 1 --stop 5 --step 2 +run_mlr seqgen --start 1 --stop 1 --step 1 -f a +run_mlr seqgen --start 5 --stop 1 --step 1 -f b +run_mlr seqgen --start 5 --stop 1 --step -1 -f c +run_mlr seqgen --start 5 --stop 5 --step -1 -f d +run_mlr --from $indir/abixy cat then seqgen --start 1 --stop 5 + # ---------------------------------------------------------------- announce STATS diff --git a/c/todo.txt b/c/todo.txt index 012110787..cf20d4e85 100644 --- a/c/todo.txt +++ b/c/todo.txt @@ -36,7 +36,6 @@ UT FOR 4.6.0: * locals in all curly-braced control structures; top-level locals; scope, extent, freeing. * distinct locals within if/elseif/.../else * mlr --opprint --from s put -v '$o1 = a; local a=1000+NR; $o2 = a; a=2000+NR; $o3 = a' -* seqgen ---------------------------------------------------------------- DOC FOR 4.6.0: