+ test "#patscan with bad stop raises" do
+ [-1, 20].each { |stop|
+ assert_raise(BackTrackError) { @seq.patscan("N", stop: stop) }
+ }
+ end
+
+ test "#patscan with OK stop dont raise" do
+ [0, 19].each { |stop|
+ assert_nothing_raised { @seq.patscan("N", stop: stop) }
+ }
+ end
+
+ test "#patscan with stop returns correctly" do
+ assert_nil(@seq.patmatch("G", start: 0, stop: 2))
+ assert_equal("3:1:g", @seq.patmatch("G", start: 0, stop: 3).to_s)
+ end
+
+ test "#patscan with bad mis raises" do