tcsh/SOURCES/tcsh-6.20.00-009-fix-regexp-for-backlash-quoting-tests.patch
2021-09-10 05:08:03 +00:00

40 lines
2.0 KiB
Diff

From 2ad4fc1705893207598ed5cd21713ddf3f17bba0 Mon Sep 17 00:00:00 2001
From: zoulasc <christos@zoulas.com>
Date: Thu, 23 Feb 2017 11:55:33 -0500
Subject: [PATCH]
https://github.com/tcsh-org/tcsh/pull/1#issuecomment-282035528
---
tests/lexical.at | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/lexical.at b/tests/lexical.at
index 7b7da4e..3dc6024 100644
--- a/tests/lexical.at
+++ b/tests/lexical.at
@@ -567,10 +567,10 @@ run=3
]])
AT_DATA([uniformity_test.csh],
[[
-set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'`
+set SERVICE_NAME_LOG = `cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g'`
echo -n "$SERVICE_NAME_LOG" > ./output1
-cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2
+cat batchsystem.properties | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\s//g' | perl -pe 's/\)/\\\)/g' | perl -pe 's/\(/\\\(/g' > ./output2
diff -uprN ./output1 ./output2 >& /dev/null
@@ -587,7 +587,7 @@ AT_DATA([quoting_result_test.csh],
echo "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP\)(HOST=db\)(PORT=1521\)\)(CONNECT_DATA=(SERVER=DEDICATED\)(SERVICE_NAME=bns03\)\)\)" > ./expected_result
set string = "jdbc_url=jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=db)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=bns03)))"
-set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[:blank:]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'`
+set SERVICE_NAME_LOG = `echo "$string" | grep '^jdbc_url' | sed -ne 's/^[^=]*=[^@]*@[[:blank:]]*\([^$]*\)$/\1/p' | perl -pe 's/\)/\\\)/g'`
echo "$SERVICE_NAME_LOG" > ./actual_result
--
2.9.3