changeset 25555:364a31cd4c4f

test.m: Don't emit warning about leaking the automatic variable "ans". * test.m: Include "ans" in the list of original workspace variables.
author Rik <rik@octave.org>
date Fri, 06 Jul 2018 14:44:48 -0700
parents fa883bb1dd42
children cbef9fc53fef
files scripts/testfun/test.m
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/testfun/test.m	Thu Jul 05 11:24:00 2018 +0200
+++ b/scripts/testfun/test.m	Fri Jul 06 14:44:48 2018 -0700
@@ -298,6 +298,8 @@
 
   ## Track variable leaks
   __base_variables_orig = evalin ("base", "who");
+  ## Add automatic variable "ans" which may not have been created yet.
+  __base_variables_orig{end+1} = "ans";
 
   ## Track variable leaks
   __global_variables_orig = who ("global");