summaryrefslogtreecommitdiff
path: root/spec/ruby/library/stringscanner/shared/terminate.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/stringscanner/shared/terminate.rb')
-rw-r--r--spec/ruby/library/stringscanner/shared/terminate.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/ruby/library/stringscanner/shared/terminate.rb b/spec/ruby/library/stringscanner/shared/terminate.rb
new file mode 100644
index 0000000000..bf41d097e2
--- /dev/null
+++ b/spec/ruby/library/stringscanner/shared/terminate.rb
@@ -0,0 +1,8 @@
+describe :strscan_terminate, shared: true do
+ it "set the scan pointer to the end of the string and clear matching data." do
+ s = StringScanner.new('This is a test')
+ s.send(@method)
+ s.bol?.should be_false
+ s.eos?.should be_true
+ end
+end