summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
Diffstat (limited to 'testing')
-rw-r--r--testing/059/059__command__catch_8tcl.xml191
-rw-r--r--testing/059_command_catch.tcl87
2 files changed, 278 insertions, 0 deletions
diff --git a/testing/059/059__command__catch_8tcl.xml b/testing/059/059__command__catch_8tcl.xml
new file mode 100644
index 0000000..6604413
--- /dev/null
+++ b/testing/059/059__command__catch_8tcl.xml
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="">
+ <compounddef id="059__command__catch_8tcl" kind="file">
+ <compoundname>059_command_catch.tcl</compoundname>
+ <sectiondef kind="func">
+ <memberdef kind="function" id="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>Invoked</definition>
+ <argsstring>args</argsstring>
+ <name>Invoked</name>
+ <briefdescription>
+ <para>should be reference by every proc below </para>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="10" bodyend="13"/>
+ <referencedby refid="059__command__catch_8tcl_1ab08ae027fc5777bc4f0629f1b60b35db" compoundref="059__command__catch_8tcl" startline="22" endline="25">a</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1a68bdb74c144118d936931c46f75d4b3e" compoundref="059__command__catch_8tcl" startline="29" endline="32">b</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1ab14f56bc3bd7680490ece4ad7815465f" compoundref="059__command__catch_8tcl" startline="33" endline="36">c</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1af43f4b1f0064a33b2d662af9f06d3a00" compoundref="059__command__catch_8tcl" startline="37" endline="40">d</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1aff65a51a703804e0ad1adbcfd76c86f8" compoundref="059__command__catch_8tcl" startline="41" endline="44">e</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1af6830d2c644b45088ea8f1f74a46b778" compoundref="059__command__catch_8tcl" startline="45" endline="48">f</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1af08b4b5bfa9edf0b0a7dee1c2b2c29e0" compoundref="059__command__catch_8tcl" startline="49" endline="54">g</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1af96fd0966e32a310a0778d2e5c357700" compoundref="059__command__catch_8tcl" startline="56" endline="59">h</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1a8c90afd4641b25be86bd09983c3cbee0" compoundref="059__command__catch_8tcl" startline="60" endline="63">i</referencedby>
+ <referencedby refid="059__command__catch_8tcl_1a2aaa92757686acea102cba3475f0c13b" compoundref="059__command__catch_8tcl" startline="75" endline="78">j</referencedby>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1a3f55465410c57ed00ab28827a741b1c3" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>NotInvoked</definition>
+ <argsstring>args</argsstring>
+ <name>NotInvoked</name>
+ <briefdescription>
+ <para>must not be reference by every proc below </para>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="16" bodyend="19"/>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1ab08ae027fc5777bc4f0629f1b60b35db" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>a</definition>
+ <argsstring>args</argsstring>
+ <name>a</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="22" bodyend="25"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1a68bdb74c144118d936931c46f75d4b3e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>b</definition>
+ <argsstring>args</argsstring>
+ <name>b</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="29" bodyend="32"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1ab14f56bc3bd7680490ece4ad7815465f" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>c</definition>
+ <argsstring>args</argsstring>
+ <name>c</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="33" bodyend="36"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1af43f4b1f0064a33b2d662af9f06d3a00" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>d</definition>
+ <argsstring>args</argsstring>
+ <name>d</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="37" bodyend="40"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1aff65a51a703804e0ad1adbcfd76c86f8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>e</definition>
+ <argsstring>args</argsstring>
+ <name>e</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="41" bodyend="44"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1af6830d2c644b45088ea8f1f74a46b778" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>f</definition>
+ <argsstring>args</argsstring>
+ <name>f</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="45" bodyend="48"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1af08b4b5bfa9edf0b0a7dee1c2b2c29e0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>g</definition>
+ <argsstring>args</argsstring>
+ <name>g</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="49" bodyend="54"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1af96fd0966e32a310a0778d2e5c357700" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>h</definition>
+ <argsstring>args</argsstring>
+ <name>h</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="56" bodyend="59"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1a8c90afd4641b25be86bd09983c3cbee0" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>i</definition>
+ <argsstring>args</argsstring>
+ <name>i</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="60" bodyend="63"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ <memberdef kind="function" id="059__command__catch_8tcl_1a2aaa92757686acea102cba3475f0c13b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual">
+ <type/>
+ <definition>j</definition>
+ <argsstring>args</argsstring>
+ <name>j</name>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <inbodydescription>
+ </inbodydescription>
+ <location file="059_command_catch.tcl" bodystart="75" bodyend="78"/>
+ <references refid="059__command__catch_8tcl_1aa889853547f65a22ae133cd57ff89601" compoundref="059__command__catch_8tcl" startline="10" endline="13">Invoked</references>
+ </memberdef>
+ </sectiondef>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ <location file="059_command_catch.tcl"/>
+ </compounddef>
+</doxygen>
diff --git a/testing/059_command_catch.tcl b/testing/059_command_catch.tcl
new file mode 100644
index 0000000..4227da7
--- /dev/null
+++ b/testing/059_command_catch.tcl
@@ -0,0 +1,87 @@
+#// objective: tests processing of catch/eval, only references/referencedby relations are relevant
+#// check: 059__command__catch_8tcl.xml
+#// config: REFERENCED_BY_RELATION = yes
+#// config: REFERENCES_RELATION = yes
+#// config: EXTRACT_ALL = yes
+#// config: INLINE_SOURCES = no
+
+##
+# \brief should be reference by every proc below
+proc Invoked args {
+ puts "Procedure \"Invoked\" is invoked indeed. Ok."
+ return $args
+}
+##
+# \brief must not be reference by every proc below
+proc NotInvoked args {
+ puts "Procedure \"NotInvoked\" is invoked. Not Ok!"
+ return $args
+}
+#
+# check if call references work at all
+proc a args {
+ Invoked NotInvoked
+ return
+}
+#
+# catch command
+# Tcl8.5: catch script ?resultVarName? ?optionsVarName?
+proc b args {
+ catch Invoked
+ return
+}
+proc c args {
+ catch Invoked NotInvoked
+ return
+}
+proc d args {
+ catch Invoked NotInvoked NotInvoked
+ return
+}
+proc e args {
+ set r [catch Invoked NotInvoked NotInvoked]
+ return
+}
+proc f args {
+ set r [catch {Invoked} NotInvoked NotInvoked]
+ return
+}
+proc g args {
+ set r [catch {
+ set x [Invoked]
+ } NotInvoked NotInvoked]
+ return
+}
+# eval arg ?arg ...?
+proc h args {
+ eval Invoked NotInvoked
+ return
+}
+proc i args {
+ eval set NotInvoked [Invoked NotInvoked]
+ return
+}
+# This is a striped down example. Original:
+#
+# jpeg.tcl --
+#
+# Querying and modifying JPEG image files.
+#
+# Copyright (c) 2004 Aaron Faupell <afaupell@users.sourceforge.net>
+#
+# ...
+# eval [list addComment $file] [lreplace $com 0 0 $comment]
+# ...
+proc j args {
+ eval [list set] [list NotInvoked] [Invoked NotInvoked]
+ return
+}
+#
+# call all single letter procs
+# let tcl check what is called and what is not called
+foreach p [info procs ?] {
+ puts "Check procedure \"$p\""
+ $p
+}
+exit
+