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