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

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

[Octave-bug-tracker] [bug #50282] CS-list example in documentation doesn


From: Martin Castillo
Subject: [Octave-bug-tracker] [bug #50282] CS-list example in documentation doesn't output stated output
Date: Fri, 17 Feb 2017 23:29:35 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0

Follow-up Comment #4, bug #50282 (project octave):

I tried doctest on doc/interpreter/
the result is in doctest.log.
if you look there, you'll see a lot problems. and many seem to be  the way
things are tested. for example:
rounding errors

 >> (-1) ^ (1 / 3)

      expected:  0.50000 - 0.86603i

      got     : ans =  0.50000 + 0.86603i


tests for wrong type(?)

   >> prod ([true, true], "native")

      expected:     true

      got     : ans = 1


testing strings (?) instead values.

   >> min ([-1 i 1 -i])

      expected:      -i

      got     : ans = -0 - 1i


I don't know what happened here...

  >> w =  1  3  3  6  6  6
    iw = 1  2  2  4  4  4
    

      expected: 
      got     : ??? parse error:

  syntax error

>>> w =  1  3  3  6  6  6
    iw = 1  2  2  4  4  4
    
            ^


Oh man:

   >> chop (-pi, 5, 5)

      expected:     -3.14150000000000

      got     : ans = -3.1415


   >> [ 1/0 e^800 ]

      expected:  Inf   Inf

      got     : warning: division by zero
ans =

   Inf   Inf


my favourite(before 'doctest .' I typed 'doctest'):

   >> disp (1)
    disp (2)
    run_history -1 -2

      expected: 
 2
 1

      got     :  1
 2
'doctest' is a function from the file
/home/mcd/octave/doctest-0.5.0/doctest.m

 -- doctest TARGET
 -- doctest TARGET -nonrecursive
 -- SUCCESS = doctest (TARGET, …)
 -- [NUMPASS, NUMTESTS, SUMMARY] = doctest (…)
     Run examples embedded in documentation.

     Doctest finds and runs code found in TARGET, which can be a:
        • function;
        • class;
        • Texinfo file;
        • directory/folder (pass ‘-nonrecursive’ to skip subfolders);
[...]



and while running, I got a bunch of the following:

/tmp/octave-help-Rrv4KT:1037: unknown command `DOCSTRING'
/tmp/octave-help-1gStjQ:1097: unknown command `opindex'
/tmp/octave-help-1gStjQ:1098: unknown command `opindex'
/tmp/octave-help-1gStjQ:1099: unknown command `opindex'
/tmp/octave-help-1gStjQ:1100: unknown command `opindex'
/tmp/octave-help-1gStjQ:1101: unknown command `opindex'
/tmp/octave-help-1gStjQ:1102: unknown command `opindex'
/tmp/octave-help-1gStjQ:1103: unknown command `opindex'
/tmp/octave-help-1gStjQ:1104: unknown command `opindex'
/tmp/octave-help-1gStjQ:1105: unknown command `opindex'
/tmp/octave-help-1gStjQ:1106: unknown command `opindex'
/tmp/octave-help-1gStjQ:1107: unknown command `opindex'
/tmp/octave-help-1gStjQ:1108: unknown command `opindex'
/tmp/octave-help-1gStjQ:1109: unknown command `opindex'
/tmp/octave-help-1gStjQ:1110: unknown command `opindex'
/tmp/octave-help-1gStjQ:1111: unknown command `opindex'
/tmp/octave-help-1gStjQ:1112: unknown command `opindex'
/tmp/octave-help-1gStjQ:1113: unknown command `opindex'
/tmp/octave-help-1gStjQ:1114: unknown command `opindex'
/tmp/octave-help-1gStjQ:1115: unknown command `opindex'
/tmp/octave-help-1gStjQ:1116: unknown command `opindex'
/tmp/octave-help-1gStjQ:1117: unknown command `opindex'
/tmp/octave-help-1gStjQ:1118: unknown command `opindex'
/tmp/octave-help-1gStjQ:1119: unknown command `opindex'
/tmp/octave-help-1gStjQ:1120: unknown command `opindex'
/tmp/octave-help-Phf2CQ:212: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:212: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:258: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:264: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:270: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:296: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:303: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:303: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:322: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:322: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:332: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:332: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:373: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:381: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:403: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:412: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:412: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:419: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:421: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:435: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:435: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:458: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:462: unknown command `DOCSTRING'
/tmp/octave-help-Phf2CQ:558: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:558: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:570: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:570: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:589: unknown command `EXAMPLEFILE'
/tmp/octave-help-Phf2CQ:589: unknown command `polynomial'
/tmp/octave-help-Phf2CQ:640: unknown command `opindex'
/tmp/octave-help-Phf2CQ:641: unknown command `opindex'


what does doctest try to compile?

/tmp/octave-help-qKjsmM:2261: unknown command `DOCSTRING'
gfortran: error: fortransub.f: Datei oder Verzeichnis nicht gefunden
gfortran: fatal error: no input files
compilation terminated.
/tmp/octave-help-q0r9Ch:407: unknown command `DOCSTRING'


(file #39781)
    _______________________________________________________

Additional Item Attachment:

File name: doctest.log                    Size:119 KB


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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