diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-12-31 06:33:21 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-12-31 06:33:21 -0800 |
commit | bf7675efa96490f8c950b494bd42657391e03b4c (patch) | |
tree | 2eca4df95ac840b03651544a5260d488aec7a867 | |
parent | aaf427354e301c940e440bd0360512df1d8438be (diff) | |
download | txr-bf7675efa96490f8c950b494bd42657391e03b4c.tar.gz txr-bf7675efa96490f8c950b494bd42657391e03b4c.tar.bz2 txr-bf7675efa96490f8c950b494bd42657391e03b4c.zip |
awk: tests for fconv.
* tests/015/awk-fconv.tl,
* tests/015/awk-fconv.expected: New files.
-rw-r--r-- | tests/015/awk-fconv.expected | 0 | ||||
-rw-r--r-- | tests/015/awk-fconv.tl | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/015/awk-fconv.expected b/tests/015/awk-fconv.expected new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/015/awk-fconv.expected 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)) |