From b2560dca2310faf970827c0aabb1d8c2a5284863 Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Mon, 12 Feb 2018 18:22:19 +0100
Subject: [PATCH] Regtest

This tests for 31adcd34384f4f5c8d65d1f56aee383a6d359d07
---
 regtest/basic/rt-make-exceptions/main.cpp         | 4 ++++
 regtest/basic/rt-make-exceptions/output.reference | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/regtest/basic/rt-make-exceptions/main.cpp b/regtest/basic/rt-make-exceptions/main.cpp
index 928bba2d6..7f1120781 100644
--- a/regtest/basic/rt-make-exceptions/main.cpp
+++ b/regtest/basic/rt-make-exceptions/main.cpp
@@ -96,6 +96,10 @@ int main(){
   plumed.cmd("readInputLine","t: TORSION ATOMS=1,2,3,4");
   plumed.cmd("readInputLine","RESTRAINT ARG=d AT=0 KAPPA=1");
 
+// check regexp not surrounded by parentheses (bug in 2.3.3).
+  test_line(ofs,plumed,"RESTRAINT ARG=x(d) KAPPA=5 AT=0");
+  test_line(ofs,plumed,"RESTRAINT ARG=(d)x KAPPA=5 AT=0");
+
   test_line(ofs,plumed,"EXTERNAL ARG=d FILE=potential LABEL=ext");
   test_line(ofs,plumed,"METAD ARG=d PACE=1 SIGMA=1 HEIGHT=0 FILE=H1 RESTART=WHAT");
   test_line(ofs,plumed,"METAD ARG=d PACE=1 SIGMA=1 TAU=5");
diff --git a/regtest/basic/rt-make-exceptions/output.reference b/regtest/basic/rt-make-exceptions/output.reference
index c560e82fa..8d66cb212 100644
--- a/regtest/basic/rt-make-exceptions/output.reference
+++ b/regtest/basic/rt-make-exceptions/output.reference
@@ -42,6 +42,10 @@ readInputLine d: RMSD REFERENCE=test-too-many-atoms.pdb
 +++ catched
 readInputLine d: DRMSD REFERENCE=missing.pdb LOWER_CUTOFF=0.0 UPPER_CUTOFF=15.0
 +++ catched
+readInputLine RESTRAINT ARG=x(d) KAPPA=5 AT=0
++++ catched
+readInputLine RESTRAINT ARG=(d)x KAPPA=5 AT=0
++++ catched
 readInputLine EXTERNAL ARG=d FILE=potential LABEL=ext
 +++ catched
 readInputLine METAD ARG=d PACE=1 SIGMA=1 HEIGHT=0 FILE=H1 RESTART=WHAT
-- 
GitLab