From b97e4e49b5c73ba2479aa334fc33fbc1a453c929 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Thu, 4 Aug 2016 21:24:02 -0400 Subject: [PATCH] mapper tee UTs --- c/mapping/mapper_tee.c | 6 +++--- c/reg_test/run | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/c/mapping/mapper_tee.c b/c/mapping/mapper_tee.c index ccf6d590f..e1be62eb9 100644 --- a/c/mapping/mapper_tee.c +++ b/c/mapping/mapper_tee.c @@ -32,7 +32,7 @@ mapper_setup_t mapper_tee_setup = { // ---------------------------------------------------------------- static mapper_t* mapper_tee_parse_cli(int* pargi, int argc, char** argv) { int do_append = FALSE; - int flush_every_record = FALSE; + int flush_every_record = TRUE; if ((argc - *pargi) < 1) { mapper_tee_usage(stderr, argv[0], argv[*pargi]); @@ -42,8 +42,8 @@ static mapper_t* mapper_tee_parse_cli(int* pargi, int argc, char** argv) { *pargi += 1; ap_state_t* pstate = ap_alloc(); - ap_define_true_flag(pstate, "-a", &do_append); - ap_define_true_flag(pstate, "-f", &flush_every_record); + ap_define_true_flag(pstate, "-a", &do_append); + ap_define_false_flag(pstate, "--no-fflush", &flush_every_record); if (!ap_parse(pstate, verb, pargi, argc, argv)) { mapper_tee_usage(stderr, argv[0], verb); diff --git a/c/reg_test/run b/c/reg_test/run index 94deada5f..a07621f0b 100755 --- a/c/reg_test/run +++ b/c/reg_test/run @@ -3426,21 +3426,21 @@ run_mlr --from $indir/abixy-wide --opprint put -q ' } ' -## ---------------------------------------------------------------- -#announce MAPPER TEE -# -#tee1=$reloutdir/tee1 -#mkdir -p $tee1 -# -#run_mlr --from $indir/abixy tee $tee1/out then nothing -#run_mlr cat -n $tee1/out -# -#run_mlr --from $indir/abixy tee $tee1/out then nothing -#run_mlr cat -n $tee1/out -# -#run_mlr --from $indir/abixy tee -a $tee1/out then nothing -#run_mlr cat -n $tee1/out -# +# ---------------------------------------------------------------- +announce MAPPER TEE + +tee1=$reloutdir/tee1 +mkdir -p $tee1 + +run_mlr --from $indir/abixy tee $tee1/out then nothing +run_mlr cat -n $tee1/out + +run_mlr --from $indir/abixy tee --no-fflush $tee1/out then nothing +run_mlr cat -n $tee1/out + +run_mlr --from $indir/abixy tee -a $tee1/out then nothing +run_mlr cat -n $tee1/out + ## ---------------------------------------------------------------- #announce DSL TEE #