diff options
Diffstat (limited to 'test/scanf/test_scanfio.rb')
-rw-r--r-- | test/scanf/test_scanfio.rb | 15 |
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 0000000000..65989877d6 --- /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 |