 (defspec test-no-wrapping-after-moved-from-right-margin
   {:num-tests (* 100 (property-tests-multiplier))}
   (prop/for-all [y (gen/choose 0 9)
-                 rubbish gen-ascii-rubbish]
+                 input gen-input]
                 (let [vt (-> (make-vt 20 10)
                              (move-cursor 19 y)
-                             (feed rubbish))
+                             (feed input))
                       {{new-x :x new-y :y} :cursor :keys [next-print-wraps]} vt]
                   (not (and next-print-wraps (< new-x 20))))))
-
-(def gen-color (gen/one-of [(gen/return nil)
-                            (gen/choose 0 7)
-                            (gen/choose 16 231)
-                            (gen/tuple (gen/choose 0 255) (gen/choose 0 255) (gen/choose 0 255))]))
 
 (defspec test-dump-sgr
   {:num-tests (* 1000 (property-tests-multiplier))}

                  (= attrs new-attrs))))

(defspec test-dump
  {:num-tests (* 1000 (property-tests-multiplier))}
  (prop/for-all [rubbish (gen/vector (gen/one-of [(gen/choose 0 0xd7ff)
                                                  ; skip Unicode surrogates and private use area
                                                  (gen/choose 0xf900 0xffff)]) 10 100)]
    (let [blank-vt (make-vt 10 5)
          vt (feed blank-vt rubbish)
          text (dump vt)
          new-vt (feed-str blank-vt text)]
      (= (:lines vt) (:lines new-vt)))))

  {:num-tests (* 100 (property-tests-multiplier))}
  (prop/for-all [x (gen/choose 0 19)
                 y (gen/choose 0 9)
                 input gen-input]
                (let [vt (-> (make-vt 20 10)
                             (move-cursor x y)
                             (feed input))
                      {:keys [next-print-wraps] {:keys [x y]} :cursor} vt]
                  (and (or (< -1 x 20) (and (= x 20) (true? next-print-wraps)))
                       (< -1 y 10)))))
