From bf7675efa96490f8c950b494bd42657391e03b4c Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 31 Dec 2020 06:33:21 -0800 Subject: awk: tests for fconv. * tests/015/awk-fconv.tl, * tests/015/awk-fconv.expected: New files. --- tests/015/awk-fconv.expected | 0 tests/015/awk-fconv.tl | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 tests/015/awk-fconv.expected create mode 100644 tests/015/awk-fconv.tl diff --git a/tests/015/awk-fconv.expected b/tests/015/awk-fconv.expected new file mode 100644 index 00000000..e69de29b diff --git a/tests/015/awk-fconv.tl b/tests/015/awk-fconv.tl new file mode 100644 index 00000000..2affa4e0 --- /dev/null +++ b/tests/015/awk-fconv.tl @@ -0,0 +1,21 @@ +(load "../common") + +(defvarl inputs '("10E3 junk 20E3 30E3 40E3 50E3")) + +(defmacro tfconv (fconv expected) + ^(test (awk (:inputs inputs) + (t (fconv ,*fconv)) + (:end f)) + ,expected)) + +(tfconv (i) (10 "junk" "20E3" "30E3" "40E3" "50E3")) +(tfconv (: : i) ("10E3" "junk" "20E3" "30E3" "40E3" 50)) +(tfconv (: : o) ("10E3" "junk" "20E3" "30E3" "40E3" 40)) +(tfconv (: : x) ("10E3" "junk" "20E3" "30E3" "40E3" #x50E3)) +(tfconv (: x) (#x10E3 nil #x20E3 #x30E3 #x40E3 #x50E3)) +(tfconv (: r) (10000.0 nil 20000.0 30000.0 40000.0 50000.0)) +(tfconv (: b) (2 nil nil nil nil nil)) +(tfconv (: bz) (2 0 0 0 0 0)) +(tfconv (i : : x) (10 "junk" "20E3" "30E3" "40E3" #x50E3)) +(tfconv (- : i : -) ("10E3" nil 20 30 40 "50E3")) +(tfconv (i : o r : x) (10 nil 20000.0 #o30 40000.0 #x50E3)) -- cgit v1.2.3