From ab046a1de48117a34e772c3cefdcdc74ad962a6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franti=C5=A1ek=20Hrdina?= Date: Wed, 15 Jan 2025 17:27:02 +0100 Subject: [PATCH] Add test for RHEL-74127 --- .../main.fmf | 20 ++++++++++++++++++ .../test.sh | 21 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 Regression/glob2regpat-returns-bad-result-on-s390x/main.fmf create mode 100755 Regression/glob2regpat-returns-bad-result-on-s390x/test.sh diff --git a/Regression/glob2regpat-returns-bad-result-on-s390x/main.fmf b/Regression/glob2regpat-returns-bad-result-on-s390x/main.fmf new file mode 100644 index 0000000..edb42f9 --- /dev/null +++ b/Regression/glob2regpat-returns-bad-result-on-s390x/main.fmf @@ -0,0 +1,20 @@ +summary: glob2regpat returns bad result on s390x +description: According to upstream tests, the glob2regpat('**') function should return .*. However, on the s390x architecture, the function unexpectedly returns $, which does not align with the expected behavior from the test. +contact: Frantisek Hrdina +component: + - vim +test: ./test.sh +framework: beakerlib +recommend: + - vim +duration: 5m +enabled: true +tag: + - Tier3 +tier: '3' +link: + - verifies: https://issues.redhat.com/browse/RHEL-74127 +adjust: + - enabled: false + when: distro < rhel-7 + continue: false diff --git a/Regression/glob2regpat-returns-bad-result-on-s390x/test.sh b/Regression/glob2regpat-returns-bad-result-on-s390x/test.sh new file mode 100755 index 0000000..678f096 --- /dev/null +++ b/Regression/glob2regpat-returns-bad-result-on-s390x/test.sh @@ -0,0 +1,21 @@ +#!/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 + rlAssertRpm vim-enhanced + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlPhaseEnd + + rlPhaseStartTest + rlRun "vim -E -s -c \"redir! > /dev/stdout\" -c \"silent! echo glob2regpat('**')\" -c \"redir END\" -c \"qa\" &> vim.log" 0 "Run glob2regpat" + rlAssertGrep ".*" vim.log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd