Daniel Shahaf
2b3638a211
test harness: Tweak quiet-test output
- Print the test name and data after the plan line
- Split on the plan line rather than on comments
+ That makes tap-filter more suitable to filter TAP output generated by other
TAP producers.
+ However, the filtered output deletes the plan line and adds a blank line in
its stead. This suits our use-case of interactive test runs.
4 år sedan
Daniel Shahaf
3414c7c0d2
test harness: Include $PREBUFFER and $BUFFER in the output.
For human readers' benefit.
4 år sedan
Daniel Shahaf
4a043b4d15
noop: Whitespace changes only.
./.editorconfig is already set correctly.
4 år sedan
Daniel Shahaf
dc70e89bfd
tests: Support non-arrays in typeset_p().
4 år sedan
Daniel Shahaf
deee22ed42
tests: Don't filter out tests that aborted.
Useful in piping Travis CI output through tap-filter manually.
4 år sedan
Daniel Shahaf
9ed2a46ed2
dev tools: New script to ease opening $EDITOR on failing tests.
Has room for improvement; for now, I use it with CTRL-W_f.
4 år sedan
Daniel Shahaf
1c6a6d92b0
dev tools: Allow specifying preamble code when generating test cases.
4 år sedan
Daniel Shahaf
c0ad50e645
dev tools: Fix regression introduced in commit "Print the test data to stdout for convenience.".
tee(1) truncated $fname. Fortunately, the data that got truncated had just
been `git add`-ed, so no harm was done.
4 år sedan
Daniel Shahaf
6f1f595e3e
dev tools: Print the test data to stdout for convenience.
4 år sedan
Sean Wei
4fb570e104
docs: Enable Syntax Highlighting for Code Snippits
5 år sedan
Matthew Martin
693757bfd7
tests: Run harness in an anon function to catch global variables
Thanks Daniel for the set -- suggestion.
5 år sedan
Matthew Martin
3259fe338d
Revert "tests: Run tests in an anon function to catch global variables"
This reverts commit ba2d8fcf76
.
Breaks 4.3.12 and .11
5 år sedan
Matthew Martin
ba2d8fcf76
tests: Run tests in an anon function to catch global variables
This would have caught #593 .
5 år sedan
Matthew Martin
9bd38c6fc0
tests: Use root variable for root of the project
5 år sedan
Matthew Martin
dddea5d5dd
tests: Set harness variables local
5 år sedan
Daniel Shahaf
06893a3873
tests: Escape region_highlight and expected_region_highlight in TAP output.
Required for TAP compliance in case the output ever contains '#' or '\n'.
5 år sedan
Daniel Shahaf
580ccaebb8
tests: (try to) Fix test failure under zsh<5.3, where 'typeset -p arrayvar''s is two lines long.
5 år sedan
Daniel Shahaf
7cb5ad0f9b
tests: Tweak XFAIL/XPASS output of cardinality check.
Stylistic tweaks only; no functional change, no effect on TAP compliance.
5 år sedan
Daniel Shahaf
cd1647f4d4
tests: Follow-up to grandparent: Make the cardinality check XPASS properly when it should.
5 år sedan
Daniel Shahaf
864864442e
tests: Allow marking the cardinality check as TODO (XFail).
Needed for next commit.
5 år sedan
Matthew Martin
a9be0975c8
tests: Directly diff expected_region_highlight against region_highlight
6 år sedan
Matthew Martin
7b417be1ce
tests: Escape newlines in TAP description
6 år sedan
Daniel Shahaf
c969a1f26a
tests: Include the filename in error messages.
The new failure mode is:
.
Running test main
Bail out! On './highlighters/main/test-data/glob.zsh': Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank
Bail out! On './highlighters/main/test-data/glob.zsh': output on stderr
Running test pattern
Fixes #478 .
6 år sedan
Daniel Shahaf
8652a8f4e4
Bump copyright years.
6 år sedan
Matthew Martin
f4d37b74cc
tests: Add ability to skip tests
6 år sedan
Matthew Martin
4bd30737dc
tests: Support SKIP directive in tap-colorizer
6 år sedan
Matthew Martin
038409c10d
tests: Run tests with WARN_CREATE_GLOBAL
6 år sedan
Matthew Martin
c948a3caa0
tests: Declare local variables
6 år sedan
Matthew Martin
18517cc98e
tests: Run tests with NOUNSET
6 år sedan
Matthew Martin
459c128f43
tests: Set ZLE variables to sane defaults
6 år sedan
Matthew Martin
079ea39f74
tests: Ensure region highlight is unset if NONE is expected
6 år sedan
Matthew Martin
a9ce931439
Default possibly unset variables to empty
6 år sedan
Matthew Martin
a33c72e838
tests: Use idiomatic set check
6 år sedan
Daniel Shahaf
5efd062a4d
tests: Add a regression test for issue #392 (aliases beginning with a '+' are lost).
7 år sedan
Daniel Shahaf
67be62107b
tests: Move some code in preparation for next commit. No functional change.
7 år sedan
Daniel Shahaf
2b303f01b6
dev tools: Automagically handle newlines (\n) in $BUFFER.
8 år sedan
Daniel Shahaf
a2876fb57d
dev tools: Add a TODO to introduce code reuse.
8 år sedan
Daniel Shahaf
a053768627
dev tools: Remove a superfluous empty line.
8 år sedan
Daniel Shahaf
5627fd2045
dev tools: Stage the copyright block to make diffs smaller.
8 år sedan
Daniel Shahaf
987c133486
dev tools: Tolerate invalid input.
8 år sedan
Daniel Shahaf
e15a09840e
dev tools: Automate a recurring step: Set year correctly for new tests.
8 år sedan
Daniel Shahaf
e2f863c151
minor: Fix typo in development usage message.
8 år sedan
Daniel Shahaf
add6825898
dev tools: Extend tests/generate.zsh.
8 år sedan
Daniel Shahaf
8013dc3b8d
dev tools: Add a script that generates a test-data file.
8 år sedan
Daniel Shahaf
fccf92402b
minor: tests: Formatting tweak to XPASS output.
Remove superfluous single quotes around the second hyphen.
8 år sedan
Matthew Martin
d37c55c788
minor: tests: Add comment for NONE in expected_region_highlight
8 år sedan
Matthew Martin
364f206a54
docs: Give example of test that modifies its environment
8 år sedan
Matthew Martin
19acd8e844
docs: Mention `$BUFFER`
8 år sedan
Matthew Martin
13018f3dd7
docs: Document use of NONE in expected_region_highlight
8 år sedan
Matthew Martin
1082067f93
tests: Fail on stderr output
Closes #291 .
8 år sedan