m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/__tests__/lexer.test.js
diff options
context:
space:
mode:
Diffstat (limited to '__tests__/lexer.test.js')
-rw-r--r--__tests__/lexer.test.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/__tests__/lexer.test.js b/__tests__/lexer.test.js
index d7a4368..1e80c25 100644
--- a/__tests__/lexer.test.js
+++ b/__tests__/lexer.test.js
@@ -160,6 +160,15 @@ describe('lex', () => {
{ type: 'constant', value: 20 }
])
})
+ test('1k2d20', () => {
+ expect(lex('1k2d20')).toEqual([
+ { type: 'constant', value: 1 },
+ { type: 'k' },
+ { type: 'constant', value: 2 },
+ { type: 'd' },
+ { type: 'constant', value: 20 }
+ ])
+ })
})
describe('bonusAdd', () => {