aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/test/asn1_SUITE.erl2
-rw-r--r--lib/common_test/doc/src/ct_hooks.xml20
-rw-r--r--lib/common_test/doc/src/ct_hooks_chapter.xml7
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl14
-rw-r--r--lib/stdlib/doc/src/unicode_usage.xml2
5 files changed, 35 insertions, 10 deletions
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl
index 56f31de638..b0c37d79e7 100644
--- a/lib/asn1/test/asn1_SUITE.erl
+++ b/lib/asn1/test/asn1_SUITE.erl
@@ -248,7 +248,7 @@ init_per_testcase(Func, Config) ->
[{case_dir, CaseDir}, {watchdog, Dog}|Config].
end_per_testcase(_Func, Config) ->
- true = code:del_path(?config(case_dir, Config)),
+ code:del_path(?config(case_dir, Config)),
test_server:timetrap_cancel(?config(watchdog, Config)).
%%------------------------------------------------------------------------------
diff --git a/lib/common_test/doc/src/ct_hooks.xml b/lib/common_test/doc/src/ct_hooks.xml
index b98c04a850..b3e713c77f 100644
--- a/lib/common_test/doc/src/ct_hooks.xml
+++ b/lib/common_test/doc/src/ct_hooks.xml
@@ -5,7 +5,7 @@
<erlref>
<header>
<copyright>
- <year>2010</year><year>2011</year>
+ <year>2010</year><year>2012</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -111,11 +111,12 @@
</func>
<func>
- <name>Module:pre_init_per_suite(SuiteName, Config, CTHState) -&gt;
+ <name>Module:pre_init_per_suite(SuiteName, InitData, CTHState) -&gt;
Result</name>
<fsummary>Called before init_per_suite</fsummary>
<type>
<v>SuiteName = atom()</v>
+ <v>InitData = Config | SkipOrFail</v>
<v>Config = NewConfig = [{Key,Value}]</v>
<v>CTHState = NewCTHState = term()</v>
<v>Result = {Return, NewCTHState}</v>
@@ -140,7 +141,8 @@
<p><c>SuiteName</c> is the name of the suite to be run.</p>
- <p><c>Config</c> is the original config list of the test suite.</p>
+ <p><c>InitData</c> is the original config list of the test suite, or
+ a <c>SkipOrFail</c> tuple if a previous CTH has returned this.</p>
<p><c>CTHState</c> is the current internal state of the CTH.</p>
@@ -212,11 +214,12 @@
</func>
<func>
- <name>Module:pre_init_per_group(GroupName, Config, CTHState) -&gt;
+ <name>Module:pre_init_per_group(GroupName, InitData, CTHState) -&gt;
Result</name>
<fsummary>Called before init_per_group</fsummary>
<type>
<v>GroupName = atom()</v>
+ <v>InitData = Config | SkipOrFail</v>
<v>Config = NewConfig = [{Key,Value}]</v>
<v>CTHState = NewCTHState = term()</v>
<v>Result = {NewConfig | SkipOrFail, NewCTHState}</v>
@@ -269,11 +272,12 @@
</func>
<func>
- <name>Module:pre_init_per_testcase(TestcaseName, Config, CTHState) -&gt;
+ <name>Module:pre_init_per_testcase(TestcaseName, InitData, CTHState) -&gt;
Result</name>
<fsummary>Called before init_per_testcase</fsummary>
<type>
<v>TestcaseName = atom()</v>
+ <v>InitData = Config | SkipOrFail</v>
<v>Config = NewConfig = [{Key,Value}]</v>
<v>CTHState = NewCTHState = term()</v>
<v>Result = {NewConfig | SkipOrFail, NewCTHState}</v>
@@ -330,11 +334,12 @@
</func>
<func>
- <name>Module:pre_end_per_group(GroupName, Config, CTHState) -&gt;
+ <name>Module:pre_end_per_group(GroupName, EndData, CTHState) -&gt;
Result</name>
<fsummary>Called before end_per_group</fsummary>
<type>
<v>GroupName = atom()</v>
+ <v>EndData = Config | SkipOrFail</v>
<v>Config = NewConfig = [{Key,Value}]</v>
<v>CTHState = NewCTHState = term()</v>
<v>Result = {NewConfig | SkipOrFail, NewCTHState}</v>
@@ -387,11 +392,12 @@
</func>
<func>
- <name>Module:pre_end_per_suite(SuiteName, Config, CTHState) -&gt;
+ <name>Module:pre_end_per_suite(SuiteName, EndData, CTHState) -&gt;
Result</name>
<fsummary>Called before end_per_suite</fsummary>
<type>
<v>SuiteName = atom()</v>
+ <v>EndData = Config | SkipOrFail</v>
<v>Config = NewConfig = [{Key,Value}]</v>
<v>CTHState = NewCTHState = term()</v>
<v>Result = {NewConfig | SkipOrFail, NewCTHState}</v>
diff --git a/lib/common_test/doc/src/ct_hooks_chapter.xml b/lib/common_test/doc/src/ct_hooks_chapter.xml
index c938851e0e..86237f5fc1 100644
--- a/lib/common_test/doc/src/ct_hooks_chapter.xml
+++ b/lib/common_test/doc/src/ct_hooks_chapter.xml
@@ -252,6 +252,13 @@
{ok, Handle} -&gt;
{[{db_handle, Handle} | Config], CTHState#state{ handle = Handle }}
end.</code>
+ <note>If using multiple CTHs, the first part of the return tuple will be
+ used as input for the next CTH. So in the case above the next CTH might
+ get <c>{fail,Reason}</c> as the second parameter. If you have many CTHs
+ which interact, it might be a good idea to not let each CTH return
+ <c>fail</c> or <c>skip</c>. Instead return that an action should be taken
+ through the <c>Config</c> list and implement a CTH which at the end takes
+ the correct action. </note>
</section>
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index 20daae8215..cbaa93a15d 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -338,7 +338,7 @@ otp_xmlify_e(#xmlElement{name=code} = E) -> % 4)
end;
otp_xmlify_e(#xmlElement{name=Tag} = E) % 5a
when Tag==h1; Tag==h2; Tag==h3; Tag==h4; Tag==h5 ->
- Content = text_only(E#xmlElement.content),
+ Content = text_and_a_name_only(E#xmlElement.content),
[E#xmlElement{name=b, content=Content}];
otp_xmlify_e(#xmlElement{name=Tag} = E) % 5b-c)
when Tag==center;
@@ -1161,6 +1161,18 @@ get_text(#xmlElement{content=[#xmlText{value=Text}]}) ->
get_text(#xmlElement{content=[E]}) ->
get_text(E).
+%% text_and_name_only(Es) -> Ts
+text_and_a_name_only([#xmlElement{
+ name = a,
+ attributes = [#xmlAttribute{name=name}]} = Name|Es]) ->
+ [Name|text_and_a_name_only(Es)];
+text_and_a_name_only([#xmlElement{content = Content}|Es]) ->
+ text_and_a_name_only(Content) ++ text_and_a_name_only(Es);
+text_and_a_name_only([#xmlText{} = E |Es]) ->
+ [E | text_and_a_name_only(Es)];
+text_and_a_name_only([]) ->
+ [].
+
%% text_only(Es) -> Ts
%% Takes a list of xmlElement and xmlText and return a lists of xmlText.
text_only([#xmlElement{content = Content}|Es]) ->
diff --git a/lib/stdlib/doc/src/unicode_usage.xml b/lib/stdlib/doc/src/unicode_usage.xml
index b7b5d497d0..acd36d2125 100644
--- a/lib/stdlib/doc/src/unicode_usage.xml
+++ b/lib/stdlib/doc/src/unicode_usage.xml
@@ -212,7 +212,7 @@ Eshell V5.7 (abort with ^G)
<section>
<title>Unicode in environment variables and parameters</title>
<p>Environment variables and their interpretation is handled much in the same way as file names. If Unicode file names are enabled, environment variables as well as parameters to the Erlang VM are expected to be in Unicode.</p>
-<p>If Unicode file names are enabled, the calls to <seealso marker="kernel:os#os_getenv/0"><c>os:getenv/0</c></seealso>, <seealso marker="kernel:os#os_getenv/1"><c>os:getenv/1</c></seealso> and <seealso marker="kernel:os#os_putenv/2"><c>os:putenv/2</c></seealso> will handle Unicode strings. On Unix-like platforms, the built-in functions will translate environment variables in UTF-8 to/from Unicode strings, possibly with codepoints > 255. On Windows the Unicode versions of the environment system API will be used, also allowing for codepoints > 255.</p>
+<p>If Unicode file names are enabled, the calls to <seealso marker="kernel:os#getenv/0"><c>os:getenv/0</c></seealso>, <seealso marker="kernel:os#getenv/1"><c>os:getenv/1</c></seealso> and <seealso marker="kernel:os#putenv/2"><c>os:putenv/2</c></seealso> will handle Unicode strings. On Unix-like platforms, the built-in functions will translate environment variables in UTF-8 to/from Unicode strings, possibly with codepoints > 255. On Windows the Unicode versions of the environment system API will be used, also allowing for codepoints > 255.</p>
<p>On Unix-like operating systems, parameters are expected to be UTF-8 without translation if Unicode file names are enabled.</p>
</section>
<section>