summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2016-03-16 17:51:26 +1100
committerBen Elliston <bje@gnu.org>2016-03-16 17:51:50 +1100
commitcef9e5b99eb29a942ecd6493fa3008d0f6afb9df (patch)
tree518d9fb20d21afcb488db66ec157ae51d2c76879 /doc
parentd2eada87b597e90e74fd836c2e27abf9594a9126 (diff)
downloaddejagnu-cef9e5b99eb29a942ecd6493fa3008d0f6afb9df.tar.gz
dejagnu-cef9e5b99eb29a942ecd6493fa3008d0f6afb9df.tar.bz2
dejagnu-cef9e5b99eb29a942ecd6493fa3008d0f6afb9df.zip
This reverts commit 4d344f712298364c836038b641625b3407db2fc3. The GCC
testsuite still uses diff. 2016-03-15 Ben Elliston <bje@gnu.org> * lib/utils.exp (diff): Remove proc. * doc/ref.xml: Update documentation. * doc/dejagnu.texi: Regenerate. * NEWS: Update.
Diffstat (limited to 'doc')
-rw-r--r--doc/dejagnu.texi28
-rw-r--r--doc/ref.xml27
2 files changed, 53 insertions, 2 deletions
diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi
index c0c80ba..99dd8f1 100644
--- a/doc/dejagnu.texi
+++ b/doc/dejagnu.texi
@@ -5414,6 +5414,7 @@ tool, and its version number.
* Grep Procedure: grep procedure.
* Prune Procedure: prune procedure.
* Runtest_file_p Procedure: runtest_file_p procedure.
+* Diff Procedure: diff procedure.
* Setenv Procedure: setenv procedure.
* unsetenv Procedure: unsetenv procedure.
* Getenv Procedure: getenv procedure.
@@ -5543,7 +5544,7 @@ the next release of DejaGnu. If a testsuite uses this
procedure, a copy of the procedure should be made and placed
in the lib directory of the testsuite.
-@node runtest_file_p procedure, setenv procedure, prune procedure, Utility Procedures
+@node runtest_file_p procedure, diff procedure, prune procedure, Utility Procedures
@subsubsection Runtest_file_p Procedure
Search @emph{runtest}s for
@@ -5576,7 +5577,30 @@ The list of patterns to compare against.
The test case filename.
@end table
-@node setenv procedure, unsetenv procedure, runtest_file_p procedure, Utility Procedures
+@node diff procedure, setenv procedure, runtest_file_p procedure, Utility Procedures
+@subsubsection Diff Procedure
+
+Compares the two files and returns a @emph{1} if
+they match, or a @emph{0} if they don't. If
+@code{verbose} is set, then it'll print the differences to
+the screen.
+
+@quotation
+
+@t{@b{diff}(@i{file_1}
+@i{file_2});}
+@end quotation
+
+@table @asis
+
+@item @code{file_1}
+The first file to compare.
+
+@item @code{file_2}
+The second file to compare.
+@end table
+
+@node setenv procedure, unsetenv procedure, diff procedure, Utility Procedures
@subsubsection Setenv Procedure
Sets the environment variable @emph{var} to the
diff --git a/doc/ref.xml b/doc/ref.xml
index 0276334..05013ae 100644
--- a/doc/ref.xml
+++ b/doc/ref.xml
@@ -3620,6 +3620,33 @@
</variablelist>
</sect4>
+ <sect4 id="diff" xreflabel="diff procedure">
+ <title>Diff Procedure</title>
+
+ <para>Compares the two files and returns a <emphasis>1</emphasis> if
+ they match, or a <emphasis>0</emphasis> if they don't. If
+ <symbol>verbose</symbol> is set, then it'll print the differences to
+ the screen.</para>
+
+ <funcsynopsis role="tcl">
+ <funcprototype>
+ <funcdef><function>diff</function></funcdef>
+ <paramdef><parameter>file_1</parameter>
+ <parameter>file_2</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <variablelist>
+ <varlistentry>
+ <term><parameter>file_1</parameter></term>
+ <listitem><para>The first file to compare.</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>file_2</parameter></term>
+ <listitem><para>The second file to compare.</para></listitem>
+ </varlistentry>
+ </variablelist>
+ </sect4>
+
<sect4 id="setenv" xreflabel="setenv procedure">
<title>Setenv Procedure</title>