Avi Halachmi (:avih) 857ffd39b0 tools: add test262 and harness
tools: add test262-harness.js to run a single test

Usage: mujs <this-file> -- [-f] [-l file1.js -l ...] suit-root test-file
-f: print full paths/stacktraces if possible
-l: load a js file after the harness and before the test (to override things)

tools: add test-262 launcher

It can run the entire suite or just a sub-folder or one file, and by
default it skips tests which are known to crash/hang.

test262-harness: @negative: match regex if exists

Some @negative tests add a regex which needs to match the error.
This wasn't tested, and now it is. This results in few more failures.

The actual string to compare is not documented, but it appears to be
err.message for plain Error(..) where the message is always compared
to "NotEarlyError" (equals/different), and err.name for anything else.

test262 launcher: minor improvements and custom mujs path

- Use getopts instead of custom arguments parsing
- Support -m path/to/mujs
- Change -s (skip bad tests) to -b, and add -B to run only bad tests
  (useful when trying to update the known bad tests list).
- Combine stderr to stdout on a per-test basis (mujs function warnings)
- Exit with error if failures > 0

test262: remove 5 tests which no longer crash/hang

test262 and harness: support -s to print failed source

test262 and harness: convert spaces to tabs
2021-04-19 12:57:43 +02:00
2020-05-27 12:32:32 +02:00
2021-04-19 12:57:43 +02:00
2020-01-02 14:37:05 +01:00
2021-03-23 12:47:49 -07:00
2018-06-08 13:51:10 +02:00
2020-05-27 12:32:32 +02:00
2020-07-06 11:04:32 +02:00
2020-05-27 12:32:32 +02:00
2018-11-26 10:40:22 +01:00

MuJS: an embeddable Javascript interpreter in C.

ABOUT

MuJS is a lightweight Javascript interpreter designed for embedding in
other software to extend them with scripting capabilities.

LICENSE

MuJS is Copyright 2013-2017 Artifex Software, Inc.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

The software is provided "as is" and the author disclaims all warranties with
regard to this software including all implied warranties of merchantability
and fitness. In no event shall the author be liable for any special, direct,
indirect, or consequential damages or any damages whatsoever resulting from
loss of use, data or profits, whether in an action of contract, negligence
or other tortious action, arising out of or in connection with the use or
performance of this software.

COMPILING

If you are building from source you can either use the provided Unix Makefile:

	make release

Or compile the source with your preferred compiler:

	cc -O2 -c one.c -o libmujs.o

INSTALLING

To install the MuJS command line interpreter, static library and header file:

	make prefix=/usr/local install

DOWNLOAD

The latest development source is available directly from the git repository:

	git clone http://git.ghostscript.com/mujs.git

REPORTING BUGS AND PROBLEMS

Report bugs on the ghostscript bugzilla, with MuJS as the selected component.

	http://bugs.ghostscript.com/

The MuJS developers hang out on IRC in the #mupdf channel on irc.freenode.net.
Description
An embeddable Javascript interpreter in C.
Readme 1.7 MiB