/usr/share/seed-gtk4-tests/javascript/check-syntax.js is in libseed-gtk4-0 4.0.0+20161014+6c77960+dfsg1-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/usr/bin/env seed
testsuite = imports.testsuite
try
{
Seed.check_syntax("5+5;")
}
catch(e)
{
testsuite.unreachable("5+5; is not a syntax error")
}
try
{
Seed.check_syntax("asdfasdf.jsdf()")
}
catch(e)
{
testsuite.unreachable("asdfasdf.jsdf() is not a syntax error")
}
try
{
Seed.check_syntax("one[)")
testsuite.unreachable("one[) should be a syntax error")
}
catch(e)
{
testsuite.assert(e instanceof SyntaxError)
}
|