diff options
author | Björn Gustavsson <[email protected]> | 2013-01-22 11:32:42 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-01-23 15:22:56 +0100 |
commit | 392d295030b63d161b7b035faeb0e5f8797474f1 (patch) | |
tree | 15cf6127916247397e58cdcbe3273e5084921768 /lib | |
parent | 74cee7dc1cc5b0332cd851da4953ebbb98224b5f (diff) | |
download | otp-392d295030b63d161b7b035faeb0e5f8797474f1.tar.gz otp-392d295030b63d161b7b035faeb0e5f8797474f1.tar.bz2 otp-392d295030b63d161b7b035faeb0e5f8797474f1.zip |
testPrimStrings: Test some constraints
Diffstat (limited to 'lib')
-rw-r--r-- | lib/asn1/test/asn1_SUITE_data/PrimStrings.asn1 | 3 | ||||
-rw-r--r-- | lib/asn1/test/testPrimStrings.erl | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/asn1/test/asn1_SUITE_data/PrimStrings.asn1 b/lib/asn1/test/asn1_SUITE_data/PrimStrings.asn1 index 9b6b34a776..cfaf4cf034 100644 --- a/lib/asn1/test/asn1_SUITE_data/PrimStrings.asn1 +++ b/lib/asn1/test/asn1_SUITE_data/PrimStrings.asn1 @@ -87,14 +87,17 @@ BS1024 ::= BIT STRING (SIZE (1024)) NsExpCon ::= [71] EXPLICIT NumericString Ps ::= PrintableString + Ps11 ::= PrintableString (FROM ("0123456789*")) Ts ::= TeletexString Vxs ::= VideotexString Vis ::= VisibleString + Vis8 ::= VisibleString (FROM ("01234567")) IA5 ::= IA5String + IA5Visible ::= IA5String (FROM (" ".."~")) Grs ::= GraphicString diff --git a/lib/asn1/test/testPrimStrings.erl b/lib/asn1/test/testPrimStrings.erl index bb4cb6ac15..935e730ca1 100644 --- a/lib/asn1/test/testPrimStrings.erl +++ b/lib/asn1/test/testPrimStrings.erl @@ -415,7 +415,7 @@ other_strings(_Rules) -> roundtrip('Ps', [47,23,99,75,47]), roundtrip('Ps', []), - + roundtrip('Ps11', "*0123456789*"), %%========================================================== %% Vis ::= VisibleString @@ -423,7 +423,8 @@ other_strings(_Rules) -> roundtrip('Vis', [47,23,99,75,47]), roundtrip('Vis', []), - + roundtrip('Vis8', "7654321001234567"), + roundtrip('Vis8', []), %%========================================================== %% IA5 ::= IA5String @@ -434,6 +435,9 @@ other_strings(_Rules) -> IA5_1 = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", roundtrip('IA5', IA5_1), + + roundtrip('IA5Visible', lists:seq($\s, $~)), + ok. |