27 lines
680 B
Bash
Executable File
27 lines
680 B
Bash
Executable File
#!/bin/bash
|
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
|
|
|
basedir=$(pwd)
|
|
|
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
|
|
|
rlJournalStart
|
|
rlPhaseStartSetup
|
|
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
|
|
rlRun "pushd $tmp"
|
|
rlRun "set -o pipefail"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartTest
|
|
rlRun "uchardet $basedir/test.sh | tee output" 0 "Check uchardet"
|
|
rlAssertGrep "ASCII" "output"
|
|
rlRun "uchardet $basedir/utf8.txt | tee output" 0 "Check uchardet"
|
|
rlAssertGrep "UTF-8" "output"
|
|
rlPhaseEnd
|
|
|
|
rlPhaseStartCleanup
|
|
rlRun "popd"
|
|
rlRun "rm -r $tmp" 0 "Remove tmp directory"
|
|
rlPhaseEnd
|
|
rlJournalEnd
|