diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-04 03:15:47 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2017-10-05 19:44:28 +0200 |
commit | 9cd1e7417e76c98094a502131af779145a77c7b9 (patch) | |
tree | be447dced7f7e891271c8f88b3b8b738db4a2357 /tests/gsm23003/gsm23003_test.ok | |
parent | ee497f245e78929ddb69ba1f06d27bcc886f6597 (diff) |
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
Diffstat (limited to 'tests/gsm23003/gsm23003_test.ok')
-rw-r--r-- | tests/gsm23003/gsm23003_test.ok | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tests/gsm23003/gsm23003_test.ok b/tests/gsm23003/gsm23003_test.ok new file mode 100644 index 00000000..777451a8 --- /dev/null +++ b/tests/gsm23003/gsm23003_test.ok @@ -0,0 +1,42 @@ +----- test_valid_imsi + 0: expect=false result=false imsi='' + 1: expect=false result=false imsi=' ' + 2: expect=false result=false imsi='1' + 3: expect=false result=false imsi='123' + 4: expect=false result=false imsi='12345' + 5: expect=true result=true imsi='123456' + 6: expect=true result=true imsi='1234567' + 7: expect=true result=true imsi='1234567890123' + 8: expect=true result=true imsi='123456789012345' + 9: expect=true result=true imsi='000000000000000' +10: expect=true result=true imsi='999999999999999' +11: expect=false result=false imsi='1234567890123456' +12: expect=false result=false imsi='a23456789012345' +13: expect=false result=false imsi='1234567b9012345' +14: expect=false result=false imsi='12345678901234c' +15: expect=false result=false imsi='123456789 01234' +16: expect=false result=false imsi='1234567 +123456' +17: expect=false result=false imsi='123456 123456' +18: expect=false result=false imsi='123456
123456' +----- test_valid_msisdn + 0: expect=false result=false msisdn='' + 1: expect=false result=false msisdn=' ' + 2: expect=true result=true msisdn='1' + 3: expect=true result=true msisdn='123' + 4: expect=true result=true msisdn='12345' + 5: expect=true result=true msisdn='123456' + 6: expect=true result=true msisdn='1234567' + 7: expect=true result=true msisdn='1234567890123' + 8: expect=true result=true msisdn='123456789012345' + 9: expect=true result=true msisdn='000000000000000' +10: expect=true result=true msisdn='999999999999999' +11: expect=false result=false msisdn='1234567890123456' +12: expect=false result=false msisdn='a23456789012345' +13: expect=false result=false msisdn='1234567b9012345' +14: expect=false result=false msisdn='12345678901234c' +15: expect=false result=false msisdn='123456789 01234' +16: expect=false result=false msisdn='1234567 +123456' +17: expect=false result=false msisdn='123456 123456' +18: expect=false result=false msisdn='123456
123456' |