1: %%
    2: %% %CopyrightBegin%
    3: %%
    4: %% Copyright Ericsson AB 1998-2011. All Rights Reserved.
    5: %%
    6: %% The contents of this file are subject to the Erlang Public License,
    7: %% Version 1.1, (the "License"); you may not use this file except in
    8: %% compliance with the License. You should have received a copy of the
    9: %% Erlang Public License along with this software. If not, it can be
   10: %% retrieved online at http://www.erlang.org/.
   11: %%
   12: %% Software distributed under the License is distributed on an "AS IS"
   13: %% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
   14: %% the License for the specific language governing rights and limitations
   15: %% under the License.
   16: %%
   17: %% %CopyrightEnd%
   18: %%
   19: -module(format_SUITE).
   20: -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, 
   21: 	 init_per_group/2,end_per_group/2]).
   22: 
   23: -export([hang_1/1]).
   24: 
   25: -export([init_per_testcase/2, end_per_testcase/2]).
   26: 
   27: -include_lib("test_server/include/test_server.hrl").
   28: 
   29: % Default timetrap timeout (set in init_per_testcase).
   30: -define(default_timeout, ?t:minutes(1)).
   31: 
   32: init_per_testcase(_Case, Config) ->
   33:     ?line Dog = ?t:timetrap(?default_timeout),
   34:     [{watchdog, Dog} | Config].
   35: end_per_testcase(_Case, Config) ->
   36:     Dog = ?config(watchdog, Config),
   37:     test_server:timetrap_cancel(Dog),
   38:     ok.
   39: 
   40: suite() -> [{ct_hooks,[ts_install_cth]}].
   41: 
   42: all() -> 
   43:     [hang_1].
   44: 
   45: groups() -> 
   46:     [].
   47: 
   48: init_per_suite(Config) ->
   49:     Config.
   50: 
   51: end_per_suite(_Config) ->
   52:     ok.
   53: 
   54: init_per_group(_GroupName, Config) ->
   55:     Config.
   56: 
   57: end_per_group(_GroupName, Config) ->
   58:     Config.
   59: 
   60: 
   61: hang_1(doc) ->
   62:     ["Bad args can hang (OTP-2400)"];
   63: hang_1(suite) ->
   64:     [];
   65: hang_1(Config) when is_list(Config) ->
   66:     ?line _ = (catch io:format(a, "", [])),
   67:     ?line _ = (catch io:format({}, "", [])),
   68:     ok.