anchor.diff:    "Test pscratch"
     (is (equal (list 0 1 2 3 0 1 2 3 0 1 2 3)
                (next-n (pscratch (pseries 0 1) (pseq (list 1 1 1 -3) :inf)) 12))
  -      "pscratch yields incorrect outputs when using patterns as source and step"))
  +      "pscratch yields incorrect outputs when using patterns as source and step")
  +  (is (equal (list 0 0 0 0)
  +             (next-n (pscratch (pseries 0 1) (pseq (list 0) :inf)) 4))
  +      "pscratch yields incorrect outputs when step stays 0")
  +  (is (equal (list 0 0 1 1 2)
  +             (next-n (pscratch (pseries 0 1) (pseq (list 0 1) :inf)) 5))
  +      "pscratch yields incorrect outputs for steps of 0 and 1"))
   
   (test pif
     "Test pif"
  
positive.code:     (is (= num
             (length (next-upto-n (pbind :foo 1 :bar 2))))
          "pbind doesn't yield the correct number of events by default for a *max-pattern-yield-length* of ~a"
          num)))
  
  (test parent ;; FIX: make sure all patterns are given parents
    "Test whether patterns have the correct parent information"
  
negative.code:          (let ((pstr (as-pstream (pbind :dur 1/3 :foo (pseq (list 1 2 3) 1)))))
             (peek pstr)
             (beat pstr)))
        "beat method is counting peeked outputs")
    (is (equal (list 1 2 nil)
               (peek-n (pseq (list 1 2) 1) 3))
        "peek-n does not return correct results")
    (is (equal (list 1 2)
               (peek-upto-n (pseq (list 1 2) 1) 3))
        "peek-upto-n does not return correct results"))
  
  (test next
    "Test next and next-upto-n"
  