aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/test/testMultipleLevels.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2012-11-19 14:44:15 +0100
committerBjörn Gustavsson <[email protected]>2012-11-26 11:12:59 +0100
commit649df4292bc8c425c52cba3657547251ef78254f (patch)
tree4bda3950a5fc09ee6ba2f5a3a5b161118bf0758a /lib/asn1/test/testMultipleLevels.erl
parent8369dac09279010238c4b887cb3bb7be90dd159e (diff)
downloadotp-649df4292bc8c425c52cba3657547251ef78254f.tar.gz
otp-649df4292bc8c425c52cba3657547251ef78254f.tar.bz2
otp-649df4292bc8c425c52cba3657547251ef78254f.zip
Fix BER encoding when multiple levels of typedefs are used
Diffstat (limited to 'lib/asn1/test/testMultipleLevels.erl')
-rw-r--r--lib/asn1/test/testMultipleLevels.erl27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/asn1/test/testMultipleLevels.erl b/lib/asn1/test/testMultipleLevels.erl
new file mode 100644
index 0000000000..ff6d023440
--- /dev/null
+++ b/lib/asn1/test/testMultipleLevels.erl
@@ -0,0 +1,27 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2012. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+%%
+
+-module(testMultipleLevels).
+-export([main/1]).
+
+main(_) ->
+ Data = {'Top',{short,"abc"},{long,"a long string follows here"}},
+ {ok,B} = 'MultipleLevels':encode('Top', Data),
+ {ok,Data} = 'MultipleLevels':decode('Top', iolist_to_binary(B)).