Add basic test
This commit is contained in:
parent
af2607338f
commit
ecf46535cf
3 changed files with 21 additions and 0 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
|||
1
|
||||
3
tests/basic/main.fmf
Normal file
3
tests/basic/main.fmf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
summary: Concise summary describing what the test does
|
||||
test: ./test.sh
|
||||
framework: beakerlib
|
||||
17
tests/basic/test.sh
Executable file
17
tests/basic/test.sh
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlRun "echo 'test string' > /usr/share/cheat/whatever" 0 "Add test cheatsheet"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "cheat whatever | grep 'test string'" 0 "Assert that test cheatsheet is properly read"
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm /usr/share/cheat/whatever"
|
||||
rlPhaseEnd
|
||||
rlJournalEnd
|
||||
Loading…
Add table
Add a link
Reference in a new issue