diff options
author | Erlang/OTP <[email protected]> | 2010-04-09 09:08:04 +0000 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2010-04-09 11:12:48 +0200 |
commit | 4e23ebfc898ff24a885257430269466dadca9510 (patch) | |
tree | f29d49aed14e5d5f4ecb336303b8304c1886d615 /lib/asn1/test/test_compile_options.erl | |
parent | 12da3796463c7d02999985ae15e98dcaa4d2bdb4 (diff) | |
parent | 2afc5c0485aca4712c23f8fefe102aacdfa2fcb5 (diff) | |
download | otp-4e23ebfc898ff24a885257430269466dadca9510.tar.gz otp-4e23ebfc898ff24a885257430269466dadca9510.tar.bz2 otp-4e23ebfc898ff24a885257430269466dadca9510.zip |
Merge branch 'ta/asn1-verbose' into dev
* ta/asn1-verbose:
Add test for verbose option to asn1_SUITE
Teach asn1ct verbose option
OTP-8565 ta/asn1-verbose
By default, the ASN.1 compiler is now silent in the absence of warnings or
errors. The new 'verbose' option or the '-v' option for erlc can be given
to show extra information (for instance, about the files that are generated).
(Thanks to Tuncer Ayaz.)
Diffstat (limited to 'lib/asn1/test/test_compile_options.erl')
-rw-r--r-- | lib/asn1/test/test_compile_options.erl | 21 |
1 files changed, 20 insertions, 1 deletions
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()). |