Hi all

I want something similar in the spirit to PythonDocTest https://docs.python.org/2/library/doctest.html

I'm talking about

basename
    "Returns the base of the basename,
        i.e.
        /foo/gloops.taz basename is 'gloops.taz'
        / basename is '/'"

Pragmas do not work well i.e.,
basename
    "Returns the base of the basename"
<expr: '''/foo/gloops.taz'' asFileReference basename' result: 'gloops.taz'>


We should invent a syntax to be put inside comments and that we can easily parse because we need to improve
the use and discovery of the library.

I was thinking about

basename
    "Returns the base of the basename"
    "
    '/foo/gloops.taz' asFileReference basename
    >>> 'gloops.taz'
    "

Do you have any idea?

I cannot not do anything and just complain that our methods are not that well documented.
We as a community should take this and build an super cool system.

I tried and defined >>> on Object to see if it works!

Object >>> aResultingObject
"If the method comment contains >>> then it is a pharo documentated test. We can check that it is true."

    "
    '/foo/gloops.taz' asFileReference basename
   >>> 'gloops.taz'
    "

    ^ self = aResultingObject


Stef


Reply via email to