diff options
author | Tuncer Ayaz <tuncer.ayaz@gmail.com> | 2010-04-08 12:14:34 +0200 |
---|---|---|
committer | Björn Gustavsson <bjorn@erlang.org> | 2010-04-08 13:45:44 +0200 |
commit | 2afc5c0485aca4712c23f8fefe102aacdfa2fcb5 (patch) | |
tree | b992ca06c4ff6ad796822f9d41f22ddd673fc7e6 | |
parent | 900ee731cbeacaf8d9917d9d2dfded4ccd63d502 (diff) | |
download | otp-2afc5c0485aca4712c23f8fefe102aacdfa2fcb5.tar.gz otp-2afc5c0485aca4712c23f8fefe102aacdfa2fcb5.tar.bz2 otp-2afc5c0485aca4712c23f8fefe102aacdfa2fcb5.zip |
Add test for verbose option to asn1_SUITE
Test that asn1ct correctly handles verbose option.
Signed-off-by: Tuncer Ayaz <tuncer.ayaz@gmail.com>
-rw-r--r-- | lib/asn1/test/asn1_SUITE.erl.src | 3 | ||||
-rw-r--r-- | lib/asn1/test/test_compile_options.erl | 21 |
2 files changed, 22 insertions, 2 deletions
diff --git a/lib/asn1/test/asn1_SUITE.erl.src b/lib/asn1/test/asn1_SUITE.erl.src index 9d3f03fc4c..ca73d259af 100644 --- a/lib/asn1/test/asn1_SUITE.erl.src +++ b/lib/asn1/test/asn1_SUITE.erl.src @@ -2240,7 +2240,8 @@ test_compile_options(Config) -> ?line ok = test_compile_options:wrong_path(Config), ?line ok = test_compile_options:path(Config), ?line ok = test_compile_options:noobj(Config), - ?line ok = test_compile_options:record_name_prefix(Config) + ?line ok = test_compile_options:record_name_prefix(Config), + ?line ok = test_compile_options:verbose(Config) end. testDoubleEllipses(suite) -> []; testDoubleEllipses(Config) -> diff --git a/lib/asn1/test/test_compile_options.erl b/lib/asn1/test/test_compile_options.erl index d51b2a6c4a..83f38c5e6d 100644 --- a/lib/asn1/test/test_compile_options.erl +++ b/lib/asn1/test/test_compile_options.erl @@ -24,7 +24,7 @@ -export([wrong_path/1,comp/2,path/1,ticket_6143/1,noobj/1, - record_name_prefix/1]). + record_name_prefix/1,verbose/1]). %% OTP-5689 wrong_path(Config) -> @@ -122,6 +122,25 @@ noobj(Config) -> file:delete(filename:join([OutDir,'p_record.erl'])), file:delete(filename:join([OutDir,'p_record.beam'])). +verbose(Config) when is_list(Config) -> + DataDir = ?config(data_dir,Config), + OutDir = ?config(priv_dir,Config), + Asn1File = filename:join([DataDir,"Comment.asn"]), + + %% Test verbose compile + ?line test_server:capture_start(), + ?line ok = asn1ct:compile(Asn1File, [{i,DataDir},{outdir,OutDir},noobj,verbose]), + ?line test_server:capture_stop(), + ?line [Line0|_] = test_server:capture_get(), + ?line lists:prefix("Erlang ASN.1 version", Line0), + + %% Test non-verbose compile + ?line test_server:capture_start(), + ?line ok = asn1ct:compile(Asn1File, [{i,DataDir},{outdir,OutDir},noobj]), + ?line test_server:capture_stop(), + ?line [] = test_server:capture_get(), + ok. + outfiles_check(OutDir) -> outfiles_check(OutDir,outfiles1()). |