Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 90ae2ab

Browse files
[[Docfix]] Added undocumented TestSkipIf requirements
The testing.md file which explains the process for writing tests for the various aspects of LiveCode contains a section on the TestSkipIf command, which skips a test if a certain requirment is met. However not all the available requirement options that TestSkipIf provides were documented. Information for these requirement options has now been added.
1 parent 4f42840 commit 90ae2ab

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

docs/development/testing.md

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,33 @@ Before running each test command, the test framework inserts a test library stac
6161
* `TestAssert pDescription, pExpectTrue`: Make a test assertion. The test is recorded as a failure if *pExpectTrue* is false. *pDescription* should be a short string that describes the test (e.g. "clipboard is clear").
6262
* `TestSkip pDescription, pReasonSkipped`: Record a test as having been skipped. *pReasonSkipped* should be a short explanation of why the test was skipped (e.g. "not supported on Windows").
6363
* `TestSkipIf pRequirement, pOptions`: Skip a test if the requirements
64-
are met. `pOptions` varies depending on the `pRequirement` enum. The
65-
following requirements are implemented:
66-
- `ide` - the IDE repo is available. No options.
64+
are met. `pOptions` varies depending on the `pRequirement` enum (if no
65+
options are explicitly specified then no options are available for that
66+
particular `pRequirement`. The following requirements are implemented:
67+
- `ide` - the IDE repo is available
6768
- `lcb` - LCB compilation supported
68-
- `docs` - the docs are available. No options.
69+
- `docs` - the docs are available
70+
- `standalone` - the test is running in the standalone test runner
6971
- `securityPermissions` - Option `set` to skip if a test should not
7072
set the `securityPermissions`
7173
- `platform` - options are comma delimited platform strings
7274
- `processor` - options are comma delimited processor strings
7375
- `stack` - options are comma delimited stack names to test if they
7476
are available
7577
- `environment` - options are comma delimited environment strings
78+
- `clipboard` - access to the clipboard is available
79+
- `wait` - the `wait` command is available and works as expected
80+
- `security` - the security module is available
81+
- `write` - write access to the filesystem is available
82+
- `ui` - the test is running in a graphical environment (as opposed
83+
to the command line)
84+
- `desktop` - the test is running on a desktop computer
85+
- `mobile` - the test is running on a mobile device
86+
- `external` - an external module can be loaded/used. Options are a
87+
comma delimited list of external module names
88+
- `database` - an database module can be loaded/used. Options are a
89+
comma delimited list of external module names
90+
- `jvm` - the Java Virtual Machine is available
7691
* `TestSkipIfNot pRequirement, pOptions`: Skip a test if the
7792
requirements are not met. Requirements and options are the same as for
7893
`TestSkipIf`.

0 commit comments

Comments
 (0)