mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
Tests to ensure reserver words and operators can be used as object keys
This commit is contained in:
parent
c200b95f6a
commit
5a306785ba
1 changed files with 10 additions and 0 deletions
|
@ -7,6 +7,16 @@ js: CoffeeScript.compile("one\r\ntwo", {no_wrap: on})
|
|||
ok js is "one;\ntwo;"
|
||||
|
||||
|
||||
# Reserved words can be used as object properties
|
||||
|
||||
obj: {
|
||||
is: -> 1
|
||||
of: 'many'
|
||||
}
|
||||
|
||||
ok obj.is() is 1
|
||||
ok obj.of is 'many'
|
||||
|
||||
# Try out language extensions to CoffeeScript.
|
||||
|
||||
# Create the Node were going to add -- a literal syntax for splitting
|
||||
|
|
Loading…
Reference in a new issue