bugGNU Octave - Bugs: bug #31294, test() doesn't find files in...

 
 

bug #31294: test() doesn't find files in packages with classes

Submitter:  Thomas Weber <tweber>
Submitted:  Sun 10 Oct 2010 05:55:44 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Thomas Weber Open/Closed:  * Closed
Release:  * dev Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 18 Oct 2010 05:21:20 AM UTC, comment #1: 

I checked in the following change:

  http://hg.savannah.gnu.org/hgweb/octave/rev/a6ab46b5926f

With it, you should be able to do

  test @dict/dict

or

  test @dict/dict.m

John W. Eaton <jwe>
Group administrator
Sun 10 Oct 2010 05:55:44 PM UTC, original submission:  

Hi,

$ hg tip
changeset:   11095:d4619eb6ef8e
but it also happens on 3.2.4

System: Debian Linux

The way test() checks for the files to test doesn't work when a package uses classes. The following is from the 'general' package. The problem seems to be that test() uses the loadpath to find the function file, but the directory @dict is not added to the loadpath:

octave:1> pkg list
Package Name  | Version | Installation directory
--------------+---------+-----------------------
     general *|   1.2.2 | /opt/octave/share/octave/packages/general-1.2.2

octave:2> path
.
/opt/octave/libexec/octave/packages/general-1.2.2/x86_64-unknown-linux-gnu-api-v40+
/opt/octave/share/octave/packages/general-1.2.2
/opt/octave/libexec/octave/3.3.52+/site/oct/x86_64-unknown-linux-gnu
<snip>

octave:3> help dict
`dict' is a function from the file /opt/octave/share/octave/packages/general-1.2.2/@dict/dict.m

octave:4> test dict
????? dict does not exist in path

octave:5> cd /opt/octave/share/octave/packages/general-1.2.2/@dict/

octave:6> test dict
error: sq_string cannot be indexed with .
error: evaluating argument list element number 1
error: called from:
error:   /opt/octave/share/octave/packages/general-1.2.2/@dict/isempty.m at line 26, column 6
error:   /opt/octave/share/octave/3.3.52+/m/testfun/test.m at line 97, column 3

Copying the file into another directory and running it from there works:

octave:2> test dict.m
PASSES 1 out of 1 tests

So, the contenct of dict.m is not to blame.

Thomas Weber <tweber>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by tweber (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-10-18 jwe StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code