summaryrefslogtreecommitdiff
path: root/test/scanf/test_scanfio.rb
blob: 65989877d69f755a2ef7ef23a42d659338ce4571 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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