Adding new test
This commit is contained in:
parent
9651e58439
commit
7b3969610f
2 changed files with 90 additions and 0 deletions
|
|
@ -0,0 +1,32 @@
|
|||
summary: Test for BZ#2211207 (libedit doesn't read ~/.editrc and has unexpected)
|
||||
description: |
|
||||
Bug summary: libedit doesn't read ~/.editrc and has unexpected ctrl-W binding
|
||||
Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=2211207
|
||||
enabled: true
|
||||
link:
|
||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=2211207
|
||||
tag:
|
||||
- NoRHEL4
|
||||
- NoRHEL5
|
||||
- NoRHEL7
|
||||
- Tier1
|
||||
tier: '1'
|
||||
adjust:
|
||||
- enabled: false
|
||||
when: distro == rhel-4, rhel-5, rhel-6, rhel-7, rhel-alt-7
|
||||
continue: false
|
||||
contact: Ondrej Mejzlik <omejzlik@redhat.com>
|
||||
component:
|
||||
- libedit
|
||||
test: ./runtest.sh
|
||||
framework: beakerlib
|
||||
recommend:
|
||||
- libedit
|
||||
- util-linux
|
||||
duration: 5m
|
||||
extra-nitrate: TC#0615602
|
||||
extra-summary:
|
||||
/CoreOS/libedit/Regression/bz2211207-libedit-doesn-t-read-editrc-and-has-unexpected
|
||||
extra-task:
|
||||
/CoreOS/libedit/Regression/bz2211207-libedit-doesn-t-read-editrc-and-has-unexpected
|
||||
id: e8bfcc2d-d38a-417a-b931-870b0907fe46
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
#!/bin/bash
|
||||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# runtest.sh of /CoreOS/libedit/Regression/bz2211207-libedit-doesn-t-read-editrc-and-has-unexpected
|
||||
# Description: Test for BZ#2211207 (libedit doesn't read ~/.editrc and has unexpected)
|
||||
# Author: Ondrej Mejzlik <omejzlik@redhat.com>
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
#
|
||||
# Copyright (c) 2023 Red Hat, Inc.
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License as
|
||||
# published by the Free Software Foundation, either version 2 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be
|
||||
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
# PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see http://www.gnu.org/licenses/.
|
||||
#
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
# Include Beaker environment
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
PACKAGE=${PACKAGE:-libedit}
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
rlAssertRpm $PACKAGE || rlDie "Package $PACKAGE not installed"
|
||||
rlLog "Arch: $(arch), PC name: $(hostname), $(hostname -A) User: $(whoami)"
|
||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||
rlRun "pushd $TmpDir" 0 "Going into tmp directory $TmpDir"
|
||||
rlRun "echo 'bind' > ~/.editrc" 0 "Add test config file"
|
||||
rlPhaseEnd
|
||||
|
||||
rlGetTestState && {
|
||||
rlPhaseStartTest
|
||||
rlRun "script -c chronyc /dev/null < /dev/null &> out" 0 "Get output"
|
||||
echo "Output: ###############"
|
||||
cat out
|
||||
rlRun "grep 'ed-move-to-end' out" 0 "If .editrc works, grep will not fail"
|
||||
rlPhaseEnd
|
||||
}
|
||||
|
||||
rlPhaseStartCleanup
|
||||
rlRun "rm -f ~/.editrc" 0 "Delete config file"
|
||||
rlRun "popd"
|
||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||
rlPhaseEnd
|
||||
rlJournalPrintText
|
||||
rlJournalEnd
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue