summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2020-07-07test-js: Show progress in taskbarLinus Groh
This was a nice feature the old run-tests.sh script had - let's add it to test-js as well! :^)
2020-07-07js: Remove test modeLinus Groh
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.
2020-07-06test-js: Use Core::File::is_directory(path) instead of opening fileAndreas Kling
2020-07-06test-js: Remove tests_to_run in favor of a DirIteratorMatthew Olsson
2020-07-06LibJS: Convert Array tests to new testing frameworkLinus Groh
2020-07-06LibJS: Convert all remaining non-Array tests to the new system :)Matthew Olsson
2020-07-06LibJS: Convert remaining top-level tests to new systemMatthew Olsson
2020-07-06test-js: Only print files with failed or skipped testsMatthew Olsson
This does not affect output when the "-t" flag is specified -- all files will still be printed in that case.
2020-07-06test-js: Display messages from console.log in test outputMatthew Olsson
This will help greatly with debugging!
2020-07-06test-js: Only parse test-common.js onceMatthew Olsson
2020-07-06test-js: Print duration of each test when given '-t' flagMatthew Olsson
2020-07-06test-js: Allow skipping tests with "test.skip(name, callback)"Matthew Olsson
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.
2020-07-06test-js: Remove run-tests.shMatthew Olsson
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.
2020-07-06LibJS/test-js: Clean up test-js codeMatthew Olsson
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.
2020-07-06LibJS: Convert most builtin tests to new systemMatthew Olsson
2020-07-06LibJS: Convert Reflect object tests to new testing frameworkLinus Groh
2020-07-06LibJS: Convert Proxy testsMatthew Olsson
2020-07-06LibJS: Add test-common.js tests, remove unused matchersMatthew Olsson
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
2020-07-06LibJS: Convert some top-level tests to the new systemMatthew Olsson
First test conversions! These look really good :)
2020-07-06LibJS/test-js: Create test-js program, prepare for test suite refactorMatthew Olsson
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 :)
2020-07-05Userland+MenuApplets: Replace two more fork/exec with posix_spawnNico Weber
2020-07-04Kernel: Move headers intended for userspace use into Kernel/API/Andreas Kling
2020-07-04LibGUI: Make GUI::Application a Core::ObjectAndreas Kling
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.
2020-07-04strace: Use ArgsParser for argument processingAnotherTest
2020-07-03cut: Accept input from stdin if no files are givenMatthew Olsson
2020-07-01js: Highlight Extends and Super tokensJack Karamanian
2020-06-30Userland: Add watch toolSahan Fernando
2020-06-29Everywhere: Replace some uses of fork/exec with posix_spawnNico Weber
It's less code, and it's potentially more efficient once posix_spawn is a real syscall.
2020-06-27Userland: Add a 'test' utilityAnotherTest
This adds an incomplete implementation of the test util, missing some user/group checks, and `-l STRING`. It also symlinks '[' to 'test'.
2020-06-21Userland: Use Web::PageView::load_html() in the "html" utilityAndreas Kling
2020-06-21Userland: Remove "ht" test utilityAndreas Kling
The new HTML parser is well integrated into Browser now and we don't need a separate tool for testing it. :^)
2020-06-21chown: Don't allow "invalid" uid/gid specs (#2596)Emanuele Torre
The usage message states that a uid/gid spec should be <uid[:gid]>. Let's not allow `anon:`, `anon:users:hello` and `:users` then.
2020-06-20LibJS: Make Value::to_object() take a GlobalObject&Andreas Kling
2020-06-20LibJS: Pass GlobalObject& to native functions and property accessorsAndreas Kling
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.
2020-06-18Userland: Add base64 toolTom Lebreux
2020-06-18keymap: Add copyright headerAndreas Kling
2020-06-18keymap: Add back a tiny utility for setting the system keyboard layoutAndreas Kling
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.
2020-06-17su: Tweak informal stringAndreas Kling
2020-06-17Meta: Scale back overly informal user-facing stringsAndreas Kling
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. :^)
2020-06-17Userland: Compliment the user when running su(1) :^)Sergey Bugaev
2020-06-17Userland: Improve cat(1)Sergey Bugaev
* 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 :^)
2020-06-17Userland: Fix a crash in chown(1)Sergey Bugaev
2020-06-17Userland: Fix wc(1)Sergey Bugaev
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`).
2020-06-17Userland: Add readlink(1)Sergey Bugaev
2020-06-17Userland: Use Core::File::read_link()Sergey Bugaev
2020-06-13ProtocolServer+LibProtocol: Propagate HTTP status codes to clientsAndreas Kling
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.
2020-06-13AK: JsonParser improvementsMatthew Olsson
- 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
2020-06-12AK: Make string-to-number conversion helpers return OptionalAndreas Kling
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
2020-06-08LibJS: Make more Interpreter functions take a GlobalObject&Andreas Kling
2020-06-08LibJS+js: Support getting last value from "_" variableLinus Groh
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 >