summaryrefslogtreecommitdiff
path: root/test/scanf/test_scanfio.rb
diff options
context:
space:
mode:
authordblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-01 12:24:42 +0000
committerdblack <dblack@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-03-01 12:24:42 +0000
commit933fb96a12978ca76cb2538a1daf19f0e968226e (patch)
treebae3eb03d241c5a22ecf00ed4bee4ea8da47ff80 /test/scanf/test_scanfio.rb
parentcac6f19906cd88161c306baeca66802c021c7735 (diff)
First commit of scanf test files
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/scanf/test_scanfio.rb')
-rw-r--r--test/scanf/test_scanfio.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/scanf/test_scanfio.rb b/test/scanf/test_scanfio.rb
new file mode 100644
index 00000000000..65989877d69
--- /dev/null
+++ b/test/scanf/test_scanfio.rb
@@ -0,0 +1,15 @@
+# $Id$
+#
+# scanf for Ruby
+#
+# Ad hoc tests of IO#scanf (needs to be expanded)
+
+
+$:.unshift("..")
+require "scanf.rb"
+
+fh = File.new("data.txt", "r")
+p fh.pos
+p fh.scanf("%s%s")
+p fh.scanf("%da fun%s")
+p fh.pos