mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-21 18:40:13 +00:00
49 lines
1.4 KiB
Text
Executable file
49 lines
1.4 KiB
Text
Executable file
|
|
run_mlr() {
|
|
echo
|
|
echo ................................................................
|
|
echo mlr "$@"
|
|
./mlr "$@"
|
|
}
|
|
|
|
mlr_expect_fail() {
|
|
echo
|
|
echo ................................................................
|
|
echo mlr "$@"
|
|
mlr "$@"
|
|
status=$?
|
|
if [ $status -ne 1 ]; then
|
|
echo "Exit status was $status; expected 1."
|
|
fi
|
|
}
|
|
|
|
announce() {
|
|
echo
|
|
echo "================================================================"
|
|
echo "$@"
|
|
echo
|
|
}
|
|
|
|
mention() {
|
|
echo
|
|
echo ---------------------------------------------------------------- "$@"
|
|
}
|
|
|
|
# ================================================================
|
|
flags="-a"
|
|
|
|
# ================================================================
|
|
#vee=-v
|
|
vee=
|
|
|
|
# ----------------------------------------------------------------
|
|
announce
|
|
|
|
mlr_expect_fail --from $indir/abixy head -n 2 then put 'dump mapexcept()'
|
|
run_mlr --from $indir/abixy --opprint head -n 2 then put '$* = mapexcept("xyz")'
|
|
run_mlr --from $indir/abixy --opprint head -n 2 then put '$* = mapexcept("xyz", "a")'
|
|
run_mlr --from $indir/abixy --opprint head -n 2 then put '$* = mapexcept($*)'
|
|
run_mlr --from $indir/abixy --opprint head -n 2 then put '$* = mapexcept($*, "a")'
|
|
run_mlr --from $indir/abixy --opprint head -n 2 then put '$* = mapexcept($*, "nonesuch")'
|
|
run_mlr --from $indir/abixy --opprint head -n 2 then put '$* = mapexcept($*, "a", "b")'
|
|
run_mlr --from $indir/abixy --opprint head -n 2 then put '$* = mapexcept($*, "a", "nonesuch", "x")'
|