Age | Commit message (Collapse) | Author |
|
This was a nice feature the old run-tests.sh script had - let's add it
to test-js as well! :^)
|
|
Now that we have a standalone test-js program, the "-t" test mode of the
js REPL is unused and can simply be removed. Required functionality has
been duplicated in test-js (isStrictMode function, loading of testing
utilities).
Also remove outdated information about tests from the js(1) man page.
|
|
|
|
|
|
|
|
|
|
|
|
This does not affect output when the "-t" flag is specified -- all files
will still be printed in that case.
|
|
This will help greatly with debugging!
|
|
|
|
|
|
Skipped tests count as a "pass" rather than a "fail" (i.e. a test suite
with a skipped test will pass), however it does display a message when
the test is printing.
This is intended for tests which _should_ work, but currently do not.
This should be preferred over "// FIXME" notes if possible.
|
|
The shell script is no longer necessary -- simply run "test-js" from
inside Serenity, or $SERENITY_ROOT/Build/Meta/Lagom/test-js from the
host.
|
|
This commit also exposes JSONObject's implementation of stringify to the
public, so that it can be used by test-js without having to go through
the interpreter's environment.
|
|
|
|
|
|
|
|
Now that test-common.js is quite a bit more complicated, we need tests
for test-common to make sure all of the matchers behave correctly
|
|
First test conversions! These look really good :)
|
|
This moves most of the work from run-tests.sh to test-js.cpp. This way,
we have a lot more control over how the test suite runs, as well as how
it outputs. This should result in some cool functionality!
This commit also refactors test-common.js to mimic the jest library.
This should allow tests to be much more expressive :)
|
|
|
|
|
|
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
|
|
|
|
|
|
|
|
|
|
It's less code, and it's potentially more efficient once
posix_spawn is a real syscall.
|
|
This adds an incomplete implementation of the test util, missing some
user/group checks, and `-l STRING`.
It also symlinks '[' to 'test'.
|
|
|
|
The new HTML parser is well integrated into Browser now and we don't
need a separate tool for testing it. :^)
|
|
The usage message states that a uid/gid spec should be <uid[:gid]>.
Let's not allow `anon:`, `anon:users:hello` and `:users` then.
|
|
|
|
More work towards supporting multiple global objects. Native C++ code
now get a GlobalObject& and don't have to ask the Interpreter for it.
I've added macros for declaring and defining native callbacks since
this was pretty tedious and this makes it easier next time we want to
change any of these signatures.
|
|
|
|
|
|
This patch removes the setuid-root flag from the KeyboardSettings GUI
application and adds back the old "keymap" program.
It doesn't feel very safe and sound to have a GUI program runnable
as setuid-root, so in the next patch I'll be making KeyboardSettings
call out to the "keymap" program to do its bidding.
|
|
|
|
We were getting a little overly memey in some places, so let's scale
things back to business-casual.
Informal language is fine in comments, commits and debug logs,
but let's keep the runtime nice and presentable. :^)
|
|
|
|
* Port it to Core::ArgsParser - even though it doesn't support any options
at the moment, it's nice to handle --help and reject other options;
* Accept "-" to mean stdin;
* Make sure to write out all data that we read, looping if needed;
* Detect Useless Uses of Cat and print a cute warning :^)
|
|
|
|
This fixes a bug in how wc(1) would not consider certain things to be words,
and removes the unused "character" counter (the "bytes" counter is what's used
for `wc -c`).
|
|
|
|
|
|
Clients now receive HTTP status codes like 200, 404, etc.
Note that a 404 with content is still considered a "successful"
download from ProtocolServer's perspective. It's up to the client
to interpret the status code.
I'm not sure if this is the best API, but it'll work for now.
|
|
- Parsing invalid JSON no longer asserts
Instead of asserting when coming across malformed JSON,
JsonParser::parse now returns an Optional<JsonValue>.
- Disallow trailing commas in JSON objects and arrays
- No longer parse 'undefined', as that is a purely JS thing
- No longer allow non-whitespace after anything consumed by the initial
parse() call. Examples of things that were valid and no longer are:
- undefineddfz
- {"foo": 1}abcd
- [1,2,3]4
- JsonObject.for_each_member now iterates in original insertion order
|
|
Get rid of the weird old signature:
- int StringType::to_int(bool& ok) const
And replace it with sensible new signature:
- Optional<int> StringType::to_int() const
|
|
|
|
The interpreter now has an "underscore is last value" flag, which makes
Interpreter::get_variable() return the last value if:
- The m_underscore_is_last_value flag is enabled
- The name of the variable lookup is "_"
- The result of that lookup is an empty value
That means "_" can still be used as a regular variable and will stop
doing its magic once anything is assigned to it.
Example REPL session:
> 1
1
> _ + _
2
> _ + _
4
> _ = "foo"
"foo"
> 1
1
> _
"foo"
> delete _
true
> 1
1
> _
1
>
|