Revert "tests: make check should test against version in build tree, not installed"
[gnome.seed] / tests / javascript / check-syntax.js
1 #!/usr/bin/env seed
2
3 testsuite = imports.testsuite
4
5 try
6 {
7     Seed.check_syntax("5+5;")
8 }
9 catch(e)
10 {
11     testsuite.unreachable("5+5; is not a syntax error")
12 }
13
14 try
15 {
16     Seed.check_syntax("asdfasdf.jsdf()")
17 }
18 catch(e)
19 {
20     testsuite.unreachable("asdfasdf.jsdf() is not a syntax error")
21 }
22
23 try
24 {
25     Seed.check_syntax("one[)")
26     testsuite.unreachable("one[) should be a syntax error")
27 }
28 catch(e)
29 {
30     testsuite.assert(e instanceof SyntaxError)
31 }
32