From d7bf7df8e97b4e6758c5a2f63ca1b7b15c7fae96 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 29 Jul 2017 19:19:45 +0200 Subject: [PATCH] simplify --- tests/bin/modelQaTestRoutines.pm | 2 +- tests/bin/ngspice.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/bin/modelQaTestRoutines.pm b/tests/bin/modelQaTestRoutines.pm index b90b915b8..9f3a915c8 100644 --- a/tests/bin/modelQaTestRoutines.pm +++ b/tests/bin/modelQaTestRoutines.pm @@ -270,7 +270,7 @@ sub processTestSpec { next; } if (/^biases\s+/i) { - s%V\s*\(\s*%V(%;s%\s*\)%)%; + s/V\s*\(\s*/V(/;s/\s*\)/)/; s/V\(([a-zA-Z0-9]+),([a-zA-Z0-9]+)\)/V($1_$2)/; # convert V(n1,n2) to V(n1_n2) @Field=split(/[\s,]+/,$_); for ($i=1;$i<=$#Field;++$i) { diff --git a/tests/bin/ngspice.pm b/tests/bin/ngspice.pm index 7bcac0704..b467c44ef 100644 --- a/tests/bin/ngspice.pm +++ b/tests/bin/ngspice.pm @@ -41,7 +41,7 @@ sub version { chomp; # Check whether this line is the one we are looking for. # Also the term in parenthesis "()" stores the number to $1 which we can reuse later. - if (s/.+ngspice-([0-9]+)//) { + if (m/.+ngspice-([0-9]+)/) { # Simple read the stored group from the matching in the if clause $version=$1; last;