hlr: add f_vty_subscr_show_nomatch()

Allow to check if a certain pattern does not match the "show subscriber"
output. This will be used by upcoming tests for the check IMEI GSUP
message type, to check if the IMEI was not stored, depending on the
OsmoHLR configuration.

Change-Id: I176d8fd2ee74e1eb7ac797f931cd6005d398740f
diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index b6bd1ad..e58515b 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -302,6 +302,14 @@
 	}
 }
 
+function f_vty_transceive_nomatch(TELNETasp_PT pt, charstring cmd, template charstring exp_ret) {
+	var charstring ret := f_vty_transceive_ret(pt, cmd);
+	if (match(ret, exp_ret)) {
+		setverdict(fail, "Matching VTY response: ", ret, ", should *not* have matched: ", exp_ret);
+		mtc.stop;
+	}
+}
+
 private template (value) charstring t_subscr_prefix(hexstring imsi) :=
 	"subscriber imsi " & hex2str(imsi) & " ";
 
@@ -351,6 +359,11 @@
 	f_vty_transceive_match(VTY, prefix & "show", exp);
 }
 
+/* perform 'show' on subscriber; result must not match with pattern 'exp' */
+function f_vty_subscr_show_nomatch(TELNETasp_PT VTY, HlrSubscriber sub, template charstring exp) {
+	var charstring prefix := valueof(t_subscr_prefix(sub.imsi));
+	f_vty_transceive_nomatch(VTY, prefix & "show", exp);
+}
 
 /***********************************************************************
  * Helper functions for ConnHdlr