31 lines
930 B
Bash
Executable File
31 lines
930 B
Bash
Executable File
#!/bin/bash
|
|
|
|
. /usr/share/beakerlib/beakerlib.sh
|
|
|
|
TEST="/AppStream/aspell/Sanity/aspell"
|
|
|
|
PACKAGES=${PACKAGES:-"aspell"}
|
|
REQUIRES=${REQUIRES:-"aspell-en"}
|
|
|
|
rlJournalStart
|
|
rlPhaseStartSetup
|
|
rlAssertRpm --all
|
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
|
rlRun "pushd $TmpDir"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartTest
|
|
rlRun "aspell --lang=en --dict-dir=$TmpDir create master test.rws <<< word" 0 "Creating word list"
|
|
rlRun "echo word | aspell --lang=en --dict-dir=$TmpDir --master=test.rws pipe > out" 0 "Checking known word"
|
|
rlAssertGrep "^*" "out"
|
|
rlRun "echo nothing | aspell --lang=en --dict-dir=$TmpDir --master=test.rws pipe > out" 0 "Checking unknown word"
|
|
rlAssertGrep "^#" "out"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartCleanup
|
|
rlRun "popd"
|
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
|
rlPhaseEnd
|
|
rlJournalPrintText
|
|
rlJournalEnd
|