test/test_scanner.rb in re_expand-0.0.1 vs test/test_scanner.rb in re_expand-0.0.2
- old
+ new
@@ -1,27 +1,28 @@
# -*- coding: utf-8 -*-
-require 'Scanner'
-
-class ScannerTest < Test::Unit::TestCase
- def setup
+module ReExpand
+ class ScannerTest < Test::Unit::TestCase
+ def setup
+ end
+
+ def teardown
+ end
+
+ def test_1
+ s = Scanner.new('abc*def')
+ assert_equal s.gettoken, 'abc'
+ assert_equal s.gettoken, '*'
+ assert_equal s.gettoken, 'def'
+ end
+
+ def test_2
+ s = Scanner.new("(a\tb|c\td)")
+ assert_equal s.gettoken, "("
+ assert_equal s.gettoken, "a\tb"
+ assert_equal s.gettoken, '|'
+ assert_equal s.gettoken, "c\td"
+ assert_equal s.gettoken, ')'
+ end
end
-
- def teardown
- end
-
- def test_1
- s = Scanner.new('abc*def')
- assert_equal s.gettoken, 'abc'
- assert_equal s.gettoken, '*'
- assert_equal s.gettoken, 'def'
- end
-
- def test_2
- s = Scanner.new("(a\tb|c\td)")
- assert_equal s.gettoken, "("
- assert_equal s.gettoken, "a\tb"
- assert_equal s.gettoken, '|'
- assert_equal s.gettoken, "c\td"
- assert_equal s.gettoken, ')'
- end
end
+