Fix upstream fix

OBS-URL: https://build.opensuse.org/package/show/shells/tcsh?expand=0&rev=112
This commit is contained in:
Dr. Werner Fink 2021-04-22 10:33:38 +00:00 committed by Git OBS Bridge
parent 58cd9ba237
commit 89f4c6ee96
3 changed files with 34 additions and 7 deletions

View File

@ -9,11 +9,11 @@ It was unintentional so a bug...
christos
---
sh.lex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
sh.lex.c | 2 +-
tests/lexical.at | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sh.lex.c b/sh.lex.c
index fdd24bc..9df132d 100644
--- a/sh.lex.c
+++ b/sh.lex.c
@@ -1046,7 +1046,7 @@ domod(Char *cp, Char type)
@ -21,7 +21,28 @@ index fdd24bc..9df132d 100644
wp = Strrchr(cp, '/');
if (wp == NULL)
- return Strsave(type == 't' ? cp : STRNULL);
+ return type == 't' ? Strsave(cp) : NULL;
+ return NULL;
if (type == 't')
xp = Strsave(wp + 1);
else
diff --git a/tests/lexical.at b/tests/lexical.at
--- a/tests/lexical.at
+++ b/tests/lexical.at
@@ -677,7 +677,7 @@ AT_CHECK([tcsh -f colon_r_no_extension.c
AT_CLEANUP
-AT_SETUP([$x:q:h does not cause out of memory crash and yields nothing])
+AT_SETUP([$x:q:h does not cause out of memory crash and yields the full string])
AT_DATA([x_colon_q_colon_h.csh],
[[set x='a/b c/d.e'
@@ -686,7 +686,7 @@ exit 0
]])
AT_CHECK([tcsh -f x_colon_q_colon_h.csh], 0,
-[
+[a/b c/d.e
])
AT_CLEANUP

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Apr 22 10:32:44 UTC 2021 - Dr. Werner Fink <werner@suse.de>
- Fix the fix tcsh-6.22.03-unintentional.patch
* It changes the expected results
-------------------------------------------------------------------
Mon Nov 30 13:26:45 UTC 2020 - Dr. Werner Fink <werner@suse.de>

View File

@ -1,7 +1,7 @@
#
# spec file for package tcsh
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -185,8 +185,8 @@ correction, a history mechanism, job control, and a C-like syntax.
ln -sf tcsh.1.gz %{buildroot}%{_mandir}/man1/csh.1.gz
%if !0%{?usrmerged}
mkdir -p %{buildroot}/bin
ln -s %{_bindir}/tcsh %{buildroot}/bin/tcsh
ln -s %{_bindir}/tcsh %{buildroot}/bin/csh
ln -s %{_bindir}/tcsh %{buildroot}/bin/tcsh
ln -s %{_bindir}/tcsh %{buildroot}/bin/csh
%endif
%files