octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #42697] test() failures when calling scripts f


From: Colin Macdonald
Subject: [Octave-bug-tracker] [bug #42697] test() failures when calling scripts from function in caller's workspace
Date: Mon, 07 Jul 2014 16:38:32 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

URL:
  <http://savannah.gnu.org/bugs/?42697>

                 Summary: test() failures when calling scripts from function
in caller's workspace
                 Project: GNU Octave
            Submitted by: cbm
            Submitted on: Mon 07 Jul 2014 04:38:31 PM GMT
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

See attached example for minimal working example.  The function creates a
variable in its caller's workspace, it then calls a script in the callers
workspace and tries to print out the value of the new variable.


> isolate
A =  10
yes variable A does exist
A =  10


isolate.m contains a simple test.  "test isolate" works the first time:


> test isolate
A =  10
yes variable A does exist
A =  10
PASSES 1 out of 1 test


But subsequent runs fail:

> test isolate
A =  10
yes variable A does exist
  ***** test
 isolate()
!!!!! test failed
'A' undefined near line 5 column 1


"clear all" makes it work once again.  Its also a bit non-determininistic!  At
least my more complicated examples are: might work twice if I make some
whitespace changes to my .m files for example.

Probably this has something to do with how the tests are parsed and processed,
but its got me stumped!



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 07 Jul 2014 04:38:31 PM GMT  Name: isolate.m  Size: 144B   By: cbm

<http://savannah.gnu.org/bugs/download.php?file_id=31687>
-------------------------------------------------------
Date: Mon 07 Jul 2014 04:38:31 PM GMT  Name: isolate_script.m  Size: 62B   By:
cbm

<http://savannah.gnu.org/bugs/download.php?file_id=31688>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42697>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]