/usr/share/seed-gtk4-tests/javascript/builtin-argument-length.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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #!/usr/bin/env seed
testsuite = imports.testsuite
function correctArgs(fs, a)
{
try
{
eval(fs).apply(this, a)
}
catch(e)
{
if(e.name == "ArgumentError")
testsuite.unreachable(fs)
}
}
function wrongArgs(fs, a)
{
try
{
eval(fs).apply(this, a)
testsuite.unreachable(fs)
}
catch(e)
{
}
}
wrongArgs("Seed.spawn", [])
correctArgs("Seed.spawn", ["asdfasdfasdf"])
wrongArgs("Seed.include", [])
wrongArgs("Seed.include", [1])
correctArgs("Seed.include", [""])
wrongArgs("Seed.include", [1,2])
wrongArgs("Seed.include", ["fail.js","another.js"])
wrongArgs("print", [])
wrongArgs("print", [1,2])
wrongArgs("print", ["asdf",2])
wrongArgs("print", [1,2,3])
wrongArgs("Seed.introspect", [])
correctArgs("Seed.introspect", [Seed])
wrongArgs("Seed.introspect", [Seed, 5.23])
wrongArgs("Seed.check_syntax", [])
correctArgs("Seed.check_syntax", ["asdfasdf"])
wrongArgs("Seed.check_syntax", ["5+5", "asdf"])
|