;; lib/minikanren/tests/appendo3.sx — 3-list append.

(mk-test
  "appendo3-forward"
  (run*
    q
    (appendo3
      (list 1 2)
      (list 3 4)
      (list 5 6)
      q))
  (list
    (list 1 2 3 4 5 6)))

(mk-test
  "appendo3-empty-everything"
  (run* q (appendo3 (list) (list) (list) q))
  (list (list)))

(mk-test
  "appendo3-recover-middle"
  (run*
    q
    (appendo3
      (list 1 2)
      q
      (list 5 6)
      (list 1 2 3 4 5 6)))
  (list (list 3 4)))

(mk-test
  "appendo3-empty-middle"
  (run*
    q
    (appendo3
      (list 1 2)
      (list)
      (list 3 4)
      q))
  (list (list 1 2 3 4)))

(mk-test
  "appendo3-empty-first-and-last"
  (run*
    q
    (appendo3 (list) (list 1 2 3) (list) q))
  (list (list 1 2 3)))

(mk-tests-run!)
