Documentation
¶
Overview ¶
Package extensiontest is the test kit of an extension repository, as Test kit in contract.md defines. One test of the repository calls Run. Run checks the links between the manifest, the skill, the scenarios, and the Nicely versions. It then installs the real ncly-<slug> and the ncly of go tool ncly in scratch folders, and runs the scenarios of testdata/script/.
A scenario runs the extension through the commands that the kit adds, so that the kit checks each answer against the schema of its command:
ncly <arg>... runs ncly, which exits 0, or not 0 after ! ncly-<slug> <arg>... runs the extension directly, the same way exits <code> <command> <arg> runs a command, these two included, and checks its exact exit code grant <service> grants the key of a declared service to the extension fake <name> puts the fake child in $WORK/bin as name
The rules of its code:
- No case reads the user's keychain, HOME, or XDG folders, or finds the user's extensions. Each scenario gets a scratch HOME and scratch XDG folders, and a PATH without the folders that hold an ncly-* file. Each service that the manifest declares gets the sentinel key sentinel-<service> in its variable, so ncly never reads the keychain for it. On Linux, D-Bus names no bus, so a read that a scenario forces finds no keychain
- The kit imports no package of core's internal/, which an extension repository cannot import either
- The kit builds every program that it runs from Go source: the extension, ncly, and the fake child of the fake/ folder
- Each failure names its file, the missing link, and its fix
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.