msc: Add test case for LU with MI=IMEI (which is illegal)

Change-Id: Ie3c91a0ff212a70a8e03e0579f240a10bc4356f4
diff --git a/library/L3_Templates.ttcn b/library/L3_Templates.ttcn
index d652873..ca81b72 100644
--- a/library/L3_Templates.ttcn
+++ b/library/L3_Templates.ttcn
@@ -56,6 +56,18 @@
 	return l3;
 }
 
+private function f_enc_IMEI_L3(hexstring digits) return IMEI_L3 {
+	var IMEI_L3 l3;
+	var integer len := lengthof(digits);
+	if (len rem 2 == 1) {	/* modulo remainder */
+		l3.oddevenIndicator := '1'B;
+	} else {
+		l3.oddevenIndicator := '0'B;
+	}
+	l3.digits := digits;
+	return l3;
+}
+
 /* send template fro Mobile Identity (IMSI) */
 template (value) MobileIdentityLV ts_MI_IMSI_LV(hexstring imsi_digits) := {
 	lengthIndicator := 0, /* overwritten */
@@ -67,6 +79,18 @@
 	}
 }
 
+/* send template fro Mobile Identity (IMEI) */
+template (value) MobileIdentityLV ts_MI_IMEI_LV(hexstring imei_digits) := {
+	lengthIndicator := 0, /* overwritten */
+	mobileIdentityV := {
+		typeOfIdentity := '000'B, /* overwritten */
+		oddEvenInd_identity := {
+			imei := f_enc_IMEI_L3(imei_digits)
+		}
+	}
+}
+
+
 /* Send template for Classmark 2 */
 template (value) MobileStationClassmark2_LV ts_CM2 := {
 	lengthIndicator := 0,
@@ -300,6 +324,43 @@
 	}
 }
 
+template PDU_ML3_NW_MS tr_ML3_MT_MM_ID_Req(template BIT3 id_type := ?) := {
+	discriminator := '0101'B,
+	tiOrSkip := {
+		skipIndicator := '0000'B
+	},
+	msgs := {
+		mm := {
+			identityRequest := {
+				messageType := '011000'B,
+				nsd := '00'B,
+				identityType := id_type,
+				spare1_5 := ?
+			}
+		}
+	}
+}
+
+template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp(MobileIdentityLV mi) modifies ts_ML3_MO := {
+	msgs := {
+		mm := {
+			identityResponse := {
+				messageType := '011001'B,
+				nsd := '00'B,
+				mobileIdentityLV := mi,
+				p_TMSI_TypeTV := omit,
+				routingAreaIdentification2TLV := omit,
+				p_TMSISignature2TLV := omit
+			}
+		}
+	}
+}
+template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMSI(hexstring imsi) :=
+					ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMSI_LV(imsi)));
+template PDU_ML3_MS_NW ts_ML3_MO_MM_ID_Rsp_IMEI(hexstring imei) :=
+					ts_ML3_MO_MM_ID_Rsp(valueof(ts_MI_IMEI_LV(imei)));
+
+
 template PDU_ML3_MS_NW ts_ML3_MO_CC(integer tid) := {
 	discriminator := '0011'B,
 	tiOrSkip := {