Commit Graph

37 Commits

Author SHA1 Message Date
Steve Dunham
7854bf4ab0 [ fix ] Fix ENOMEM on macos rest runner 2024-04-28 11:10:19 -07:00
Guillaume Allais
b4d7bba550 [ cleanup ] use default arguments
This simplifies most calls to `testsInDir`.
2023-09-07 14:57:22 +01:00
Mathew Polzin
4bedaac811
[ fix ] make color output toggling simpler and also more robust. (#2848)
* make color output toggling simpler and also more robust

* don't unintentionally assert that tests are run in an environment where colors are turned on.

* Update src/Idris/Env.idr
2023-01-22 13:35:57 -06:00
Denis Buzdalov
8d7b993cca [ cleanup ] Use several library functions instead of their code 2022-12-05 15:10:16 +00:00
G. Allais
475d13bb11
[ fix ] parsing of test lib's options (#2725)
Co-authored-by: Mathew Polzin <matt.polzin@gmail.com>
2022-10-21 21:01:54 +01:00
CodingCellist
47c2de3148
[ repl ] Add the ability to get detailed help, e.g. :help :help (#2722)
A common issue for users is that the behaviour of the various repl
commands are not documented anywhere despite some of them having complex
behaviour (e.g. `:set` which accepts a specific set of options). This
implements the ability to call `:?|:h|:help` on repl commands to request
detailed help for a specific repl command, while preserving the
behaviour that calling the help command without any arguments prints the
general help text.

Generic help is defined as the first line of the help text.
Detailed help is defined as the entire help text.

This means that `:help :t`, for example, does not error (there is no
detailed help) but instead just prints the single line of help text.

* [ repl ] Use unlines for detailed help (see #2087)

  Ideally, the lines affected should be multiline strings. But for some
  arcane reason, newlines in those get swallowed in Nix and Windows
  **CI** only Ô.o
  This was already documented in issue #2087.

* [ new ] --except for golden testing lib

  To allow CI to pass despite #2087

Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
2022-10-21 14:35:33 +02:00
QDelta
e0a19aa01e
[ fix #2719 ] --only behavior in Test.Golden (#2720)
Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
2022-10-18 12:36:09 +01:00
Denis Buzdalov
eb4cc0054b [ golden ] Make options to store more flexible tests filter 2022-10-14 15:03:05 +01:00
Denis Buzdalov
2744a3a5a2
[ golden ] Truncate long test names when printing the results (#2553) 2022-10-06 19:18:34 +01:00
Denis Buzdalov
1402194f14 [ golden ] Split runner to be able to run with custom options 2022-09-27 22:05:12 +01:00
G. Allais
f80fc184e3
[ new ] :exec for RefC (#2466) 2022-05-10 15:09:53 +01:00
Jan de Muijnck-Hughes
4ba3bb6670
[ fix ] Literate things (#2312)
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2022-02-18 11:29:52 +00:00
CodingCellist
f4b78157cc
[ base,tests ] Reduce dependency on contrib (#1595) 2022-02-02 11:17:10 +00:00
Mathew Polzin
266e06cab7
[cleanup] Small round of unused import culling. (#2231)
* small round of unused import culling.

* and also the libraries.
2021-12-29 20:42:29 -08:00
Denis Buzdalov
7834539240
[ re #238 ] Fix program error condition of git diff call in Golden (#2119)
* [ fix ] Fix returned status of the `system` function

* [ re #238 ] Fix program error condition of `git diff` call in `Golden`

According to documentation, not only negative exit code means error
2021-12-22 13:33:37 -08:00
teggot
d3aed0404c
[ fix #1959 ] use modern record update syntax (#2196) 2021-12-16 18:23:18 +00:00
Denis Buzdalov
ba180706d6 [ ux ] Make expected and given results be printed colourful in Golden 2021-11-11 23:25:11 +00:00
Robert Wright
c964f8d8bc Add System escapeCmd function 2021-11-05 11:59:17 +00:00
Denis Buzdalov
44328d73de [ fix ] Wrap paths in quotes for one more call for system 2021-09-16 10:49:18 +01:00
G. Allais
8b9916f5b1
[ html ] Various HTML docs fixes (#1924) 2021-09-15 18:41:37 +01:00
shenlebantongying
d4553a1a2d
Add chez-scheme to chez search path (#1921) 2021-09-14 12:07:44 +01:00
Denis Buzdalov
853547e99c [ golden ] Allow test dir names to contain spaces 2021-09-14 12:05:46 +01:00
Stiopa Koltsov
7325002dec Implement test discovery
`testInDir dir ...` lists all directories in `dir` which contains
`run` files, and such directories are considered tests.

This is done to make test addition/maintenance cheaper.

Convert some test directories to `testInDir`, but not all of them
because
* some directories are listed in several test groups
* other directories are have some tests disabled
2021-07-17 16:53:43 +01:00
Stepan Koltsov
ce44d3b50a
Change semantics of lines and unlines function to match Haskell and other languages (#1585)
* Add trailing newline on non-empty list in unlines

There are several reasons to do that:
* a line in a text file is something which ends with newline,
  and the last line is not special
* `unlines []` should be different from `unlines [""]`
* `unlines (a ++ b) = unlines a ++ unlines b`
* Haskell does it

* Change lines function behaviour
2021-07-17 14:54:23 +01:00
Alex Humphreys
f195aed2cd [ Test ] allow 'N' as an acceptable response
Situation I just ran into that I found confusing:
```
Golden value differs from actual value.
Accept actual value as new golden value? [y/N]
N
Invalid answer.
```
2021-07-17 13:29:13 +01:00
Guillaume ALLAIS
516b1b18f5 [ fix ] padding shouldn't be affected by ANSI escape codes 2021-06-24 16:38:27 +01:00
Guillaume ALLAIS
c217911573 [ fix ] Only pass --cg to test exec if requested
Do not pass a codegen choice when the test pool specifies it does
not require a codegen to be specified.
2021-06-24 16:36:03 +01:00
G. Allais
d2986e5fea
[ refactor ] to allow testpools to specify a backend (#1591) 2021-06-21 22:12:17 +01:00
G. Allais
49f8cefeff
[ cleanup ] Test.Golden (#1526) 2021-06-21 17:30:11 +01:00
Robert Wright
85e4df8004 Add filenames to Golden Test missing file error reporting 2021-06-14 12:56:39 +01:00
Fabián Heredia Montiel
4c99537062 Add color to tests 2021-06-13 10:36:30 -05:00
Guillaume ALLAIS
b5cbf9274d [ test ] cosmetic improvements
Put the dependency checks in the banner, e.g.:

------------------------------------------------------------------------
Base library
✓ Found Chez at /usr/bin/chezscheme9.5
✓ Found node at /usr/bin/node
------------------------------------------------------------------------
2021-05-26 19:50:50 +01:00
G. Allais
004cc45e9d
[ test ] cosmetic changes & retest capability (#1394)
* Banners for test pools
* Summary with the list of failing tests at the end
* Option to write the list of failing tests to a file
* Option to read the list of tests to run from a file
* Using these two latest features to add a new make target to rerun precisely the tests that failed last time
2021-05-11 09:46:21 +01:00
Niklas Larsson
69c29269ed add tests to Windows CI 2021-04-12 15:48:46 +02:00
Niklas Larsson
9ffc346ebb
Use file extensions when looking for exes on windows (#1268)
Co-authored-by: G. Allais <guillaume.allais@ens-lyon.org>
2021-04-08 21:11:34 +01:00
Guillaume ALLAIS
80f8a0f8fe [ re #1185 ] add threads option to test runner 2021-03-16 14:03:46 +00:00
Mathew Polzin
06586d401a
Add a test package to the Idris 2 project (#1162) 2021-03-09 18:27:05 +00:00