diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-04-14 21:23:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-04-14 21:23:40 -0700 |
commit | e33a5c88d867eb8b7e518d9ca113757d8c5f650e (patch) | |
tree | f52d77b132c297cffcc90401effce0b37b92bb64 /testcases-cons | |
parent | 3fbe59612519b2bd43b81f98fe43d043dd8a9a6f (diff) | |
download | cppawk-e33a5c88d867eb8b7e518d9ca113757d8c5f650e.tar.gz cppawk-e33a5c88d867eb8b7e518d9ca113757d8c5f650e.tar.bz2 cppawk-e33a5c88d867eb8b7e518d9ca113757d8c5f650e.zip |
cons: document position function and add tests
Diffstat (limited to 'testcases-cons')
-rw-r--r-- | testcases-cons | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/testcases-cons b/testcases-cons index 1295cbc..6d14401 100644 --- a/testcases-cons +++ b/testcases-cons @@ -579,3 +579,23 @@ BEGIN { nil nil nil +-- +32: +$cppawk ' +#include <cons.h> + +BEGIN { + print sexp(position(1, list(1, 2, 3))) + print sexp(position(2, list(1, 2, 3))) + print sexp(position(3, list(1, 2, 3))) + print sexp(position(4, list(1, 2, 3))) + print sexp(position(1, nil)) + print sexp(position(nil, nil)) +}' +: +0 +1 +2 +nil +nil +nil |