]>
iEval git - data-dump-sexp.git/blob - t/Data-Dump-Sexp.t
5 use Test
::More tests
=> 10;
6 BEGIN { use_ok
('Data::Dump::Sexp') };
11 is dump_sexp
('yes'), '"yes"';
12 is dump_sexp
('"ha\\ha\\ha"'), '"\\"ha\\\\ha\\\\ha\\""';
13 is dump_sexp
([1, "yes", 2]), '(1 "yes" 2)';
14 is dump_sexp
({b
=> 5, a
=> "yes"}), '(("a" . "yes") ("b" . 5))';
18 my $ds = Data
::SExpression
->new({use_symbol_class
=> 1, fold_lists
=> 0});
19 my $parsed = $ds->read($sexp);
20 is dump_sexp
($parsed), $sexp
23 roundtrip_test
'symbol';
24 roundtrip_test
'(HA-HA 111 "text")';
25 roundtrip_test
'(cons . cell)';
26 roundtrip_test
'(1 2 3 . 4)';
This page took 0.0466 seconds and 4 git commands to generate.