aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2012-07-24 11:49:29 -0500
committerJoshua Peek <josh@joshpeek.com>2012-07-24 11:49:29 -0500
commite5d302459fd718ca26a1d9477a1c5220092a8fd1 (patch)
tree4272e2a095201e2366fd0af48a3a9a6c65d29924 /test
parent7aac87681bf62632c0b0007526134ce23eaa8310 (diff)
Fix tokenzing empty strings
Diffstat (limited to 'test')
-rw-r--r--test/test_tokenizer.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_tokenizer.rb b/test/test_tokenizer.rb
index 81654a0..d57726c 100644
--- a/test/test_tokenizer.rb
+++ b/test/test_tokenizer.rb
@@ -20,6 +20,10 @@ class TestTokenizer < Test::Unit::TestCase
assert_equal %w(print), tokenize("print 'Josh'")
assert_equal %w(print), tokenize('print "Hello \"Josh\""')
assert_equal %w(print), tokenize("print 'Hello \\'Josh\\''")
+ assert_equal %w(print), tokenize("print \"Hello\", \"Josh\"")
+ assert_equal %w(print), tokenize("print 'Hello', 'Josh'")
+ assert_equal %w(print), tokenize("print \"Hello\", \"\", \"Josh\"")
+ assert_equal %w(print), tokenize("print 'Hello', '', 'Josh'")
end
def test_skip_number_literals