... | ... | @@ -232,35 +232,20 @@ Where \<args...\> is a list of arguments. |
|
|
There are many pre-defined functions which can be used in this field:
|
|
|
|
|
|
- **normal** don't change any options from the defaults
|
|
|
- **skip** skip this test
|
|
|
- **skip_if_no_ghci** skip unless GHCi is available
|
|
|
|
|
|
- **skip_if_fast** skip if "fast" is enabled
|
|
|
- **skip** skip this test
|
|
|
|
|
|
- **omit_ways(ways)** skip this test for certain ways
|
|
|
|
|
|
- **only_ways(ways)** do this test certain ways only
|
|
|
|
|
|
- **extra_ways(ways)** add some ways which would normally be disabled
|
|
|
|
|
|
- **omit_compiler_types(compilers)** skip this test for certain compilers
|
|
|
|
|
|
- **only_compiler_types(compilers)** do this test for certain compilers only
|
|
|
|
|
|
- **expect_broken(bug)** this test is a expected not to work due to the indicated trac bug number
|
|
|
|
|
|
- **expect_broken_for(bug, ways)** as expect_broken, but only for the indicated ways
|
|
|
|
|
|
- **if_compiler_type(compiler_type, f)** Do `f`, but only for the given compiler type
|
|
|
|
|
|
- **if_platform(plat, f)** Do `f`, but only if we are on the specific platform given
|
|
|
|
|
|
- **if_tag(tag, f)** do `f` if the compiler has a given tag
|
|
|
|
|
|
- **unless_tag(tag, f)** do `f` unless the compiler has a given tag
|
|
|
|
|
|
- **set_stdin(file)** use a different file for stdin
|
|
|
|
|
|
- **no_stdin** use no stdin at all (otherwise use `/dev/null`)
|
|
|
|
|
|
- **exit_code(n)** expect an exit code of 'n' from the prog
|
... | ... | @@ -282,23 +267,38 @@ There are many pre-defined functions which can be used in this field: |
|
|
- **literate** look for a `.lhs` file instead of a `.hs` file
|
|
|
|
|
|
- **c_src** look for a `.c` file
|
|
|
|
|
|
- **objc_src** look for a `.m` file
|
|
|
|
|
|
- **objcpp_src** look for a `.mm` file
|
|
|
|
|
|
- **cmd_prefix(string)** prefix this string to the command when run
|
|
|
- **pre_cmd(string)** run this command before running the test
|
|
|
- **compiler_cmd_prefix(string)** prefix this string to the compilation command when run
|
|
|
- **cmd_prefix(string)** prefix this string to the execution command when run
|
|
|
|
|
|
- **normalise_slashes** convert backslashes to forward slashes before comparing the output
|
|
|
|
|
|
- **when(predicate, f)** Do `f`, but only if `predicate` is `True`
|
|
|
- **unless(predicate, f)** Do `f`, but only if `predicate` is `False`
|
|
|
|
|
|
|
|
|
There are a number of predicates which can be used:
|
|
|
|
|
|
- **doing_ghci** GHCi is available
|
|
|
|
|
|
- **fast** the testsuite is running in "fast" mode
|
|
|
|
|
|
The following should normally not be used; instead, use the `expect_broken*`
|
|
|
- **compiler_type(ct)** a compiler of type `ct` (which could be `'ghc'`, `'hug'`, etc) is being tested
|
|
|
|
|
|
- **platform(plat)** the testsuite is running on platform `plat` (which could be `'x86_64-unknown-mingw32'` etc)
|
|
|
|
|
|
- **tag(t)** the compiler has tag `t`
|
|
|
|
|
|
|
|
|
The following helpers should normally not be used; instead, use the `expect_broken*`
|
|
|
functions above so that the problem doesn't get forgotten about, and when we
|
|
|
come back to look at the test later we know whether current behaviour is why
|
|
|
we marked it as expected to fail:
|
|
|
|
|
|
- **expect_fail** this test is an expected failure, i.e. there is a known bug in the compiler, but we don't want to fix it.
|
|
|
|
|
|
- **expect_fail_for(ways)** expect failure for certain ways
|
|
|
|
|
|
|
... | ... | |