summaryrefslogtreecommitdiffstats
path: root/tests/012/readprint.tl
blob: b3c2ff14ff6d0578699137e46e6ccf1a33e17792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
(load "../common")

(mstest
  '[ . a] "[. a]"
  '[. a] "[. a]"
  '[ . @a] "[. @a]"
  '[. @a] "[. @a]"
  '[] "[]"
  '[. 3] "[. 3]"
  '[3 . 4] "[3 . 4]"
  '(dwim) "[]"
  '(dwim . 3) "[. 3]"
  '(dwim 3 . 4) "[3 . 4]")

(mtest
  (tostring #b'ff') "#b'ff'"
  (tostringp #b'ff') "ff")

(let ((b #b'abcdef'))
  (mtest
    `@b` "abcdef"
    `@{b [0..1]}` "ab"
    `@{b [-1..:]}` "ef"
    `@{b ":"}` "abcdef"
    `@{b [0..2] ":"}` "abcd"
    `@{b [-1]}` "239"))