+2017-08-29 Ben Elliston <bje@gnu.org>
+
+ Revert these changes:
+
+ 2016-04-25 Ben Elliston <bje@gnu.org>
+
+ * testsuite/runtest.all/utils.test: Remove unsetenv test.
+
+ 2016-04-24 Ben Elliston <bje@gnu.org>
+
+ * lib/utils.exp (unsetenv): Remove proc.
+ * doc/dejagnu.texi: Update documentation.
+ * NEWS: Update.
+
2017-08-19 Ben Elliston <bje@gnu.org>
* lib/framework.exp (xml_tag): Escape all of the non-printable
Changes since 1.6:
-1. The user-visible utility procedure `unsetenv' has been removed. If
- a testsuite uses any of these procedures, a copy of the procedure
- should be made and placed in the lib directory of the testsuite.
-
Changes since 1.5.3:
1. Proper support for target communication via SSH has been added.
* runtest_file_p Procedure: runtest_file_p procedure
* diff Procedure: diff procedure
* setenv Procedure: setenv procedure
+* unsetenv Procedure: unsetenv procedure
* getenv Procedure: getenv procedure
* prune_system_crud Procedure: prune_system_crud procedure
@end menu
The second file to compare.
@end table
-@node setenv procedure, getenv procedure, diff procedure, Utility Procedures
+@node setenv procedure, unsetenv procedure, diff procedure, Utility Procedures
@subsubsection setenv Procedure
Sets the environment variable @emph{var} to the value @emph{val}.
The value to set the variable to.
@end table
-@node getenv procedure, prune_system_crud procedure, setenv procedure, Utility Procedures
+@node unsetenv procedure, getenv procedure, setenv procedure, Utility Procedures
+@subsubsection unsetenv Procedure
+
+Unsets the environment variable
+@emph{var}.
+
+@quotation
+@t{@b{unsetenv}@{@i{var}@}}
+@end quotation
+
+@table @asis
+
+@item @code{var}
+The environment variable to unset.
+@end table
+
+@node getenv procedure, prune_system_crud procedure, unsetenv procedure, Utility Procedures
@subsubsection getenv Procedure
Returns the value of @emph{var} in the environment if it exists,
untested "getenv, get an environment variable"
}
+# Test unsetenv:
+#
+if [info exists env(TESTRUN)] {
+ unsetenv TESTRUN
+ if [info exists env(TESTRUN)] {
+ fail "unsetenv, unset an environment variable"
+ } else {
+ pass "unsetenv, unset an environment variable"
+ }
+} else {
+ untested "unsetenv, unset an environment variable"
+}
+
# Test 'which' using a relative path.
#
if {[which ./config.status] != 0} {