Commit Graph

913 Commits

Author SHA1 Message Date
Andreas Kling
9f752ce1f6 top: Don't print more lines than the terminal can fit 2020-07-27 17:04:47 +02:00
Andreas Kling
b6e29656a1 top: Limit printed process name characters to the available space
It looks much nicer if we don't break the line. You can resize the
terminal if you want to see the full process name.
2020-07-27 17:01:20 +02:00
Andreas Kling
417e3877d7 top: Tweak username column width to accomodate "clipboard" 2020-07-27 16:52:36 +02:00
Andreas Kling
11ff9d0f17 LibWeb: Move DOM classes into the Web::DOM namespace
LibWeb keeps growing and the Web namespace is filling up fast.
Let's put DOM stuff into Web::DOM, just like we already started doing
with SVG stuff in Web::SVG.
2020-07-26 20:05:15 +02:00
asynts
ac9c2bc492 AK: Implement Span which represents a contiguous sequence of objects.
This makes it possible to pass one object rather than pointer and length
individually.
2020-07-26 16:49:06 +02:00
Luke
08221139a5 test-web: Add ability to change page mid-test
This allows you to not have to write a separate test file
for the same thing but in a different situation.

This doesn't handle when you change the page with location.href
however.

Changes the name of the page load handlers to prevent confusion
with this.
2020-07-25 12:35:15 +02:00
Luke
60599d03dd LibWeb+test-web: Create test-web program, add doctype test
LibWeb currently has no test suite or program. Let's change that :^)

test-web is mostly a copy of test-js, but modified for LibWeb.
test-web imports both LibJS/Tests/test-common.js and
LibWeb/Test/test-common.js

LibWeb's suite provides the ability to specify the page to load,
what to do before the page is loaded, and what to do after it's
loaded.

This also provides a test of document.doctype and its close sibling
document.compatMode.

Currently, this isn't added to Lagom because of CodeGenerators.
2020-07-23 13:11:41 +02:00
Nico Weber
5ba8aba197 AK: Make encode_base64 take a ByteBuffer and return a String
That makes the interface symmetric with decode_base64 and it's
what all current callers want (except for one, which is buggy).
2020-07-22 19:22:00 +02:00
Peter Elliott
b44a7f68cd Userland: add mkfifo(1) 2020-07-19 11:46:37 +02:00
Peter Elliott
b9619989dd Userland: mknod: Don't use major/minor when creating a pipe 2020-07-19 11:46:37 +02:00
Nico Weber
c2565ef55e Userland: Add a "seq" utility
It's useful with the newly added for loops in Shell.

SerenityOS's printf() doesn't seem to print decimals for
doubles correctly, so this doesn't print the right output for
fractional numbers yet.
2020-07-16 17:52:18 +02:00
Peter Elliott
16fd5753eb Userland: Make test exit 1 silently when no arguments are given 2020-07-16 16:00:51 +02:00
Stijn
7bf4b1c9f0 Userland: Add a basic version of the tree command 2020-07-14 20:15:10 +02:00
AnotherTest
d6c7cdce98 unzip: Correct compression method offset value 2020-07-14 12:05:37 +02:00
AnotherTest
3a7a689b87 unzip: Remove some magic numbers and create directories when needed
This commit also adds an assert about the compression method instead of
just writing out the compressed data.
2020-07-13 15:28:54 +02:00
AnotherTest
6a265f7c21 unzip: mmap() the zip file if possible to avoid spamming syscalls
This patch makes `unzip' mmap the zip file instead of seeking the file
repeatedly.
This makes unzipping big files bearable, and unzipping huge files
impossible.
The later could be fixed by mapping/unmapping chunks on the fly once we
have support for mmap() offsets.
2020-07-13 15:28:54 +02:00
Linus Groh
8afbf89380 Userland: Add "ini" command to read and write .ini config files 2020-07-11 23:56:33 +02:00
Matthew Olsson
7a1d485b19 LibJS: Integrate Symbols into objects as valid keys
This allows objects properties to be created for symbol keys in addition
to just plain strings/numbers
2020-07-09 23:33:00 +02:00
Linus Groh
bfbd6df892 test-js: Show progress in taskbar
This was a nice feature the old run-tests.sh script had - let's add it
to test-js as well! :^)
2020-07-07 10:40:06 +02:00
Linus Groh
8b76a1e548 js: Remove test mode
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-07 00:21:30 +02:00
Andreas Kling
651829c1e6 test-js: Use Core::File::is_directory(path) instead of opening file 2020-07-06 23:46:29 +02:00
Matthew Olsson
695ba071a8 test-js: Remove tests_to_run in favor of a DirIterator 2020-07-06 23:40:35 +02:00
Linus Groh
461d90d042 LibJS: Convert Array tests to new testing framework 2020-07-06 23:40:35 +02:00
Matthew Olsson
15de2eda2b LibJS: Convert all remaining non-Array tests to the new system :) 2020-07-06 23:40:35 +02:00
Matthew Olsson
918f4affd5 LibJS: Convert remaining top-level tests to new system 2020-07-06 23:40:35 +02:00
Matthew Olsson
e532888242 test-js: Only print files with failed or skipped tests
This does not affect output when the "-t" flag is specified -- all files
will still be printed in that case.
2020-07-06 23:40:35 +02:00
Matthew Olsson
a2dbd955f2 test-js: Display messages from console.log in test output
This will help greatly with debugging!
2020-07-06 23:40:35 +02:00
Matthew Olsson
38648f1758 test-js: Only parse test-common.js once 2020-07-06 23:40:35 +02:00
Matthew Olsson
a822512443 test-js: Print duration of each test when given '-t' flag 2020-07-06 23:40:35 +02:00
Matthew Olsson
82fa65135a test-js: Allow skipping tests with "test.skip(name, callback)"
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-06 23:40:35 +02:00
Matthew Olsson
cf537311e4 test-js: Remove run-tests.sh
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-06 23:40:35 +02:00
Matthew Olsson
26acc8ba88 LibJS/test-js: Clean up test-js code
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-06 23:40:35 +02:00
Matthew Olsson
3f97d75778 LibJS: Convert most builtin tests to new system 2020-07-06 23:40:35 +02:00
Linus Groh
46581773c1 LibJS: Convert Reflect object tests to new testing framework 2020-07-06 23:40:35 +02:00
Matthew Olsson
449a1cf3a2 LibJS: Convert Proxy tests 2020-07-06 23:40:35 +02:00
Matthew Olsson
b86faeaeef LibJS: Add test-common.js tests, remove unused matchers
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-06 23:40:35 +02:00
Matthew Olsson
eea6041302 LibJS: Convert some top-level tests to the new system
First test conversions! These look really good :)
2020-07-06 23:40:35 +02:00
Matthew Olsson
b9cf7a833f LibJS/test-js: Create test-js program, prepare for test suite refactor
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-06 23:40:35 +02:00
Nico Weber
9cc32d6e95 Userland+MenuApplets: Replace two more fork/exec with posix_spawn 2020-07-05 16:03:23 +02:00
Andreas Kling
11c4a28660 Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
Andreas Kling
1dd1595043 LibGUI: Make GUI::Application a Core::Object
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-04 14:05:57 +02:00
AnotherTest
aa7148af89 strace: Use ArgsParser for argument processing 2020-07-04 10:49:36 +02:00
Matthew Olsson
6cb6e47779 cut: Accept input from stdin if no files are given 2020-07-03 19:30:13 +02:00
Jack Karamanian
1da7fea602 js: Highlight Extends and Super tokens 2020-07-01 11:18:44 +02:00
Sahan Fernando
0fc8931d5f Userland: Add watch tool 2020-06-30 12:46:23 +02:00
Nico Weber
12cbc4ad0d Everywhere: Replace some uses of fork/exec with posix_spawn
It's less code, and it's potentially more efficient once
posix_spawn is a real syscall.
2020-06-29 12:04:27 +02:00
AnotherTest
880c3fb83f Userland: Add a 'test' utility
This adds an incomplete implementation of the test util, missing some
user/group checks, and `-l STRING`.
It also symlinks '[' to 'test'.
2020-06-27 16:08:52 +02:00
Andreas Kling
c9d55e3b80 Userland: Use Web::PageView::load_html() in the "html" utility 2020-06-21 22:04:26 +02:00
Andreas Kling
457a687050 Userland: Remove "ht" test utility
The new HTML parser is well integrated into Browser now and we don't
need a separate tool for testing it. :^)
2020-06-21 21:54:30 +02:00
Emanuele Torre
4bbe01def1
chown: Don't allow "invalid" uid/gid specs (#2596)
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-21 09:54:07 +02:00