bugGNU Octave - Bugs: bug #50282, CS-list example in documentation...

 
 

bug #50282: CS-list example in documentation doesn't output stated output

Submitted by:  Martin Castillo <castilma>
Submitted on:  Sat 11 Feb 2017 11:33:46 PM UTC  
 
Category: DocumentationSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Documentation
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.0Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 22 Feb 2017 04:02:07 PM UTC, comment #7:

I fixed some of the immediate examples of problems in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/54404cc32903). I'm going to close this report, but another one can be opened if desired on why doctest has problems with @opindex, @EXAMPLEFILE, etc.

Rik <rik5>
Project Administrator
Mon 20 Feb 2017 10:32:09 PM UTC, comment #6:

Without expanding the scope of this bug to all possible typos or strict incompatibilities with the doctest command, do we have a working patch for the original doc fix?

Or is the original bug not urgent enough that we might as well turn this into a long investigation and discussion of how or whether to make all examples fully doctest-compatible? That has been discussed before, but I don't remember if there is an open bug on it or if it was on the maintainers list.

Mike Miller <mtmiller>
Project Administrator
Sat 18 Feb 2017 03:39:00 PM UTC, comment #5:

> if you look there, you'll see a lot problems. and many seem to be the way things are tested. for example:

rounding errors

> [...]
> tests for wrong type(?)
> [...]
> testing strings (?) instead values.


I don't think that is an issue with doctest, that is exactly what doctest is supposed to do. It compares a command in the examples, with the output it generates at the prompt, and that is a string.

Carnë Draug <carandraug>
Project Member
Sat 18 Feb 2017 04:29:35 AM UTC, comment #4:

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

tests for wrong type(?)

testing strings (?) instead values.

I don't know what happened here...

Oh man:

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

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

what does doctest try to compile?

(file #39781)

Martin Castillo <castilma>
Sat 18 Feb 2017 02:15:04 AM UTC, comment #3:

Rik, that is the same output I got.

Carnë, when should those tests be executed? I think they should be executed automatically, with 'make check'. But for that to work, you'd need the doctest package...

Martin Castillo <castilma>
Tue 14 Feb 2017 02:02:06 PM UTC, comment #2:

The doctest package may be of use to identify this issues https://octave.sourceforge.io/doctest/index.html

I executes all the example blocks and checks that the output matches.

Carnë Draug <carandraug>
Project Member
Mon 13 Feb 2017 11:47:53 PM UTC, comment #1:

It seems that the situation is even worse than you suggest. I tried the sample code from the documentation in Octave 4.2.0 and I get something something completely different from the stated results:

Can you verify this? Are there other changes to the documentation that need to be made here?

Rik <rik5>
Project Administrator
Sat 11 Feb 2017 11:33:46 PM UTC, original submission:

https://www.gnu.org/software/octave/doc/interpreter/Comma-Separated-Lists-Generated-from-Cell-Arrays.html#Comma-Separated-Lists-Generated-from-Cell-Arrays

The last example here does only print the given output, if the second line is

My first patch is attached.

Martin Castillo <castilma>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #39781:  doctest.log added by castilma (120KiB - text/x-log)
file #39729:  doc.patch added by castilma (621B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by castilma (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 22 Feb 2017 04:02:07 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sat 18 Feb 2017 04:29:35 AM UTCcastilmaAttached File-=>Added doctest.log, #39781
    Mon 13 Feb 2017 11:47:53 PM UTCrik5StatusNone=>Confirmed
      Summaryexample in documentation doesn't output stated output=>CS-list example in documentation doesn't output stated output
    Sat 11 Feb 2017 11:33:46 PM UTCcastilmaAttached File-=>Added doc.patch, #39729

    Back to the top


    Powered by Savane 3.1-cleanup1