;; One test case per line.
;; If the case doesn't begin with a single quote or a colon, it also
;; gets a variant case that does.
;; Lines starting with `;` are comments.

;; * Numeric

None
False
True

5
5.1

Inf
-Inf
NaN

5j
5.1j
2+1j
1.2+3.4j
Inf-Infj
NaN+NaNj

(Fraction 1 3)

;; * Symbols and keywords

'mysymbol
'my♥symbol?
'.
'..
'...
'....
:mykeyword
:my♥keyword?
:
'':mykeyword
; A keyword with only one single quote gets represented without the
; quote (which is equivalent), so it's tested in
; `test-hy-repr-roundtrip-from-value`.

;; * Dotted identifiers

'foo.bar
'.foo.bar
'..foo.bar
'...foo.bar
'....foo.bar

;; * Stringy thingies

""
b""
(bytearray b"")

"apple bloom"
b"apple bloom"
(bytearray b"apple bloom")
"⚘"

"single ' quotes"
b"single ' quotes"
"\"double \" quotes\""
b"\"double \" quotes\""

'#[[bracketed string]]
'#[delim[bracketed string]delim]
'#[delim[brack'eted string]delim]

;; * Collections

[]
#()
#{}
(frozenset #{})
{}

['[]]
[1 2 3]
#(1 2 3)
#{1 2 3}
'#{3 2 1 2}
(frozenset #{1 2 3})
{"a" 1  "b" 2}
{"b" 2  "a" 1}

'[1 a 3]
[1 'a 3]
[1 '[2 3] 4]

(deque [])
(deque [1 2.5 None "hello"])
(ChainMap {})
(ChainMap {1 2} {3 4})
(OrderedDict [])
(OrderedDict [#(1 2) #(3 4)])

;; * Expressions

'(+ 1 2)
'(f a b)
'(f #* args #** kwargs)
'(.real 3)
'(.a.b.c foo)
'(math.sqrt 25)
'(. a)
'(. None)
'(. 1 2)
; `(. a b)` will render as `a.b`.
'(.. 1 2)
'(.. a b)
[1 [2 3] #(4 #('mysymbol :mykeyword)) {"a" b"hello"} '(f #* a #** b)]
'(quote)

;; * Quasiquoting

'[1 `[2 3] 4]
'[1 `[~foo ~@bar] 4]
'[1 `[~(+ 1 2) ~@(+ [1] [2])] 4]
'[1 `[~(do (print x 'y) 1)] 4]
'(quasiquote 1 2 3)
'[1 `[2 (unquote foo bar)]]
'[a ~@b]
'[a ~ @b]

;; * F-strings

'f"a{:a}"
'f"a{{{{(+ 1 1)}}}}"
'f"the answer is {(+ 2 2)}"
'f"the answer is {(+ 2 2) !r :4}"
'f"the answer is {(+ 2 2) :{(+ 2 3)}}"

'#[f-delim[the answer is {(+ 2 2) :{(+ 2 3)}}]f-delim]

;; * Ranges and slices

(range 5)
(slice 5)
(range 2 5)
(slice 2 5)
(range 5 2)
(slice 5 2)
(range 0 5 2)
(slice 0 5 2)
(range 0 5 -2)
(slice 0 5 -2)
(slice [1 2 3] #(4 6) "hello")

;; * Regexen

(re.compile "foo")
(re.compile "\\Ax\\Z")
(re.compile "'")
(re.compile "\"")
(re.compile "foo" re.IGNORECASE)
(re.compile "foo" (| re.IGNORECASE re.MULTILINE))
