aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2012-07-24 11:28:27 -0500
committerJoshua Peek <josh@joshpeek.com>2012-07-24 11:28:27 -0500
commit53300ca5812a3f19b4ea1c670e286d68b900c7cf (patch)
tree0f04a290e956d41753e5ea4ec1a24b91a18018a5 /test
parent52833b58d529dd2fec89689db58611e96e9f0e52 (diff)
Add brackets to tokens
Diffstat (limited to 'test')
-rw-r--r--test/test_tokenizer.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/test_tokenizer.rb b/test/test_tokenizer.rb
index 55271ba..81654a0 100644
--- a/test/test_tokenizer.rb
+++ b/test/test_tokenizer.rb
@@ -78,13 +78,17 @@ class TestTokenizer < Test::Unit::TestCase
def test_objective_c_tokens
assert_equal %w(#import <Foundation/Foundation.h> @interface Foo NSObject { } @end), tokenize(:"Objective-C/Foo.h")
assert_equal %w(#import @implementation Foo @end), tokenize(:"Objective-C/Foo.m")
- assert_equal %w(#import <Cocoa/Cocoa.h> int main \( int argc char *argv \) { NSLog \( @ \) ; return ; }), tokenize(:"Objective-C/hello.m")
+ assert_equal %w(#import <Cocoa/Cocoa.h> int main \( int argc char *argv [ ] \) { NSLog \( @ \) ; return ; }), tokenize(:"Objective-C/hello.m")
end
def test_javascript_tokens
assert_equal %w( \( function \( \) { console.log \( \) ; } \) .call \( this \) ;), tokenize(:"JavaScript/hello.js")
end
+ def test_json_tokens
+ assert_equal %w( { [ ] { } } ), tokenize(:"JSON/product.json")
+ end
+
def test_ruby_tokens
assert_equal %w(module Foo end), tokenize(:"Ruby/foo.rb")
assert_equal %w(# /usr/bin/env ruby puts), tokenize(:"Ruby/script.rb")