From a71c6b976fa79fa3bcd0e61850a1a57071159b28 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 9 Aug 2012 18:00:13 +0200 Subject: Update user config to use nested tuple keys ct:get_config and ct:require can now use nested tuples to fetch data from user configuration. E.g. ct:get_config({localhost,ip,v4}). This introduces a backwards incompatability with how names are associated with keys when using require/2. E.g. ct:require(a_name,{localhost,ip}) will associate a_name with ip instead of localhost. --- lib/common_test/doc/src/common_test_app.xml | 6 +++--- lib/common_test/doc/src/config_file_chapter.xml | 2 +- lib/common_test/doc/src/event_handler_chapter.xml | 4 ++-- lib/common_test/doc/src/write_test_chapter.xml | 3 ++- 4 files changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/common_test/doc/src') diff --git a/lib/common_test/doc/src/common_test_app.xml b/lib/common_test/doc/src/common_test_app.xml index 6babdb93af..addeed002a 100644 --- a/lib/common_test/doc/src/common_test_app.xml +++ b/lib/common_test/doc/src/common_test_app.xml @@ -162,7 +162,7 @@ Func = atom() Args = list() Fun = fun() - Required = Key | {Key,SubKeys} + Required = Key | {Key,SubKeys} | {Key,SubKey} | {Key,SubKey,SubKeys} Key = atom() SubKeys = SubKey | [SubKey] SubKey = atom() @@ -289,7 +289,7 @@ Func = atom() Args = list() Fun = fun() - Required = Key | {Key,SubKeys} + Required = Key | {Key,SubKeys} | {Key,Subkey} | {Key,Subkey,SubKeys} Key = atom() SubKeys = SubKey | [SubKey] SubKey = atom() @@ -476,7 +476,7 @@ Func = atom() Args = list() Fun = fun() - Required = Key | {Key,SubKeys} + Required = Key | {Key,SubKeys} | {Key,Subkey} | {Key,Subkey,SubKeys} Key = atom() SubKeys = SubKey | [SubKey] SubKey = atom() diff --git a/lib/common_test/doc/src/config_file_chapter.xml b/lib/common_test/doc/src/config_file_chapter.xml index 6a860bb58b..706d0d5f4e 100644 --- a/lib/common_test/doc/src/config_file_chapter.xml +++ b/lib/common_test/doc/src/config_file_chapter.xml @@ -295,7 +295,7 @@
         [{ftp_host, [{ftp, "targethost"}, {username, "tester"}, {password, "letmein"}]},
-        {lm_directory, "/test/loadmodules"}]
+ {lm_directory, "/test/loadmodules"}] diff --git a/lib/common_test/doc/src/event_handler_chapter.xml b/lib/common_test/doc/src/event_handler_chapter.xml index a5886b9687..2f796b91ab 100644 --- a/lib/common_test/doc/src/event_handler_chapter.xml +++ b/lib/common_test/doc/src/event_handler_chapter.xml @@ -205,7 +205,7 @@ {error,{RunTimeError,StackTrace}} | {timetrap_timeout,integer()} | {failed,{Suite,end_per_testcase,FailInfo}}, reason for failure.

-

RequireInfo = {not_available,atom()}, why require has failed.

+

RequireInfo = {not_available,atom() | tuple()}, why require has failed.

FailInfo = {timetrap_timeout,integer()} | {RunTimeError,StackTrace} | UserTerm, @@ -233,7 +233,7 @@ reason for auto skipping Func.

FailReason = {Suite,ConfigFunc,FailInfo}} | {Suite,FailedCaseInSequence}, reason for failure.

-

RequireInfo = {not_available,atom()}, why require has failed.

+

RequireInfo = {not_available,atom() | tuple()}, why require has failed.

ConfigFunc = init_per_suite | init_per_group

FailInfo = {timetrap_timeout,integer()} | {RunTimeError,StackTrace} | diff --git a/lib/common_test/doc/src/write_test_chapter.xml b/lib/common_test/doc/src/write_test_chapter.xml index 7b7e7af8ea..d545c9e432 100644 --- a/lib/common_test/doc/src/write_test_chapter.xml +++ b/lib/common_test/doc/src/write_test_chapter.xml @@ -338,7 +338,8 @@

 	    testcase2() -> 
-	        [{require, unix_telnet, {unix, [telnet, username, password]}},
+	        [{require, unix_telnet, unix},
+		 {require, {unix, [telnet, username, password]}},
 	         {default_config, unix, [{telnet, "my_telnet_host"},
 	                                 {username, "aladdin"},
 	                                 {password, "sesame"}]}}].
-- cgit v1.2.3