diff options
| author | Federico Angelilli <code@fedang.net> | 2024-06-07 02:22:26 +0200 |
|---|---|---|
| committer | Federico Angelilli <code@fedang.net> | 2024-06-07 02:22:26 +0200 |
| commit | c12c5720bd233752f4ce5e7396bb1709c10b55be (patch) | |
| tree | cac99132613fd1e321f93e332a51a6667d77449b /test | |
| parent | 180c90e48f1d24352d25965a6d880b762c0c4d84 (diff) | |
Add number sexp and pretty-print quote
Diffstat (limited to 'test')
| -rw-r--r-- | test/sexp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/sexp.c b/test/sexp.c index 6f8dfc5..8070156 100644 --- a/test/sexp.c +++ b/test/sexp.c @@ -13,8 +13,9 @@ int main() "() id ciao 20 a1020|x|3a\n" ";comm\n3433 ;s\n" "'symbol 'another 'a\n" - "'(a b c) '('a) ''x \"escape \\\"inside the string\"\n" - "\"string very long sus\" (\"a\" \"b\")\n"; + "'(a b c z) '('a) ''x \"escape \\\"inside the string\"\n" + "\"string very long sus\" (\"a\" \"b\")\n" + "10 -20 30 41 -22345 123456789 '1\n"; any_sexp_reader_t reader; any_sexp_reader_string_t string; @@ -22,9 +23,10 @@ int main() any_sexp_t sexp = any_sexp_read(&reader); while (!ANY_SEXP_IS_ERROR(sexp)) { - printf(" %d ", any_sexp_print(sexp)); + //printf(" %d ", any_sexp_print(sexp)); + any_sexp_print(sexp); putchar('\n'); - any_sexp_free(sexp); + any_sexp_free_list(sexp); sexp = any_sexp_read(&reader); } |
