add osmo_imsi_str_valid() and osmo_msisdn_str_valid()

Add GSM23003_IMSI_MIN_DIGITS definition.
Add regression test gsm23003_test.c to test the two new functions.

Will be used by OsmoHLR to validate VTY and CTRL input.

Change-Id: I1e94f5b0717b947d2a7a7d36bacdf04a75cb3522
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b138717..dbe349f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -15,7 +15,7 @@
 		 write_queue/wqueue_test socket/socket_test		\
 		 coding/coding_test conv/conv_gsm0503_test		\
 		 abis/abis_test endian/endian_test sercomm/sercomm_test	\
-		 stats/stats_test prbs/prbs_test
+		 stats/stats_test prbs/prbs_test gsm23003/gsm23003_test
 
 if ENABLE_MSGFILE
 check_PROGRAMS += msgfile/msgfile_test
@@ -186,6 +186,9 @@
 prbs_prbs_test_SOURCES = prbs/prbs_test.c
 prbs_prbs_test_LDADD = $(top_builddir)/src/libosmocore.la
 
+gsm23003_gsm23003_test_SOURCES = gsm23003/gsm23003_test.c
+gsm23003_gsm23003_test_LDADD = $(top_builddir)/src/gsm/libosmogsm.la $(top_builddir)/src/libosmocore.la
+
 # The `:;' works around a Bash 3.2 bug when the output is not writeable.
 $(srcdir)/package.m4: $(top_srcdir)/configure.ac
 	:;{ \
@@ -241,7 +244,8 @@
 	     osmo-auc-gen/osmo-auc-gen_test.ok				\
 	     osmo-auc-gen/osmo-auc-gen_test.err				\
 	     conv/conv_gsm0503_test.ok endian/endian_test.ok 		\
-	     sercomm/sercomm_test.ok prbs/prbs_test.ok
+	     sercomm/sercomm_test.ok prbs/prbs_test.ok			\
+	     gsm23003/gsm23003_test.ok
 
 DISTCLEANFILES = atconfig atlocal conv/gsm0503_test_vectors.c
 BUILT_SOURCES = conv/gsm0503_test_vectors.c