File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff line change @@ -149,35 +149,5 @@ The `assert` function takes a description and a command:
149149assert " Description of what is being tested" " command to run"
150150```
151151
152- Example test file structure:
153-
154- ``` shell
155- #! /usr/bin/env sh
156- set -eu
157-
158- test_install_once () {
159- assert " Install script exits successfully on first run" \
160- " cd /dotfiles/profiles/myprofile && sh install.sh"
161- }
162-
163- test_install_idempotent () {
164- assert " Install script exits successfully on first run" \
165- " cd /dotfiles/profiles/myprofile && sh install.sh"
166- assert " Install script exits successfully on second run (idempotent)" \
167- " cd /dotfiles/profiles/myprofile && sh install.sh"
168- }
169-
170- test_install_uninstall () {
171- assert " Install script exits successfully" \
172- " cd /dotfiles/profiles/myprofile && sh install.sh"
173- assert " Uninstall script exits successfully" \
174- " cd /dotfiles/profiles/myprofile && sh uninstall.sh"
175- }
176-
177- # Run all tests
178- test_install_once
179- test_install_idempotent
180- test_install_uninstall
181- ```
182152
183153The template profile at ` profiles/_template/tests.sh ` provides a starting point for new profile tests.
You can’t perform that action at this time.
0 commit comments