www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16985] New: Enable runnable unittest on dlang.org after 2.073


          Issue ID: 16985
           Summary: Enable runnable unittest on dlang.org after 2.073
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dlang.org
          Assignee: nobody puremagic.com
          Reporter: greeenify gmail.com

With https://github.com/dlang/dlang.org/pull/1297 running unittest directly on
dlang.org is supported.
However, to have a smooth start it has only been enabled for /phobos-prerelease

Moreover, the added imports to the unittest blocks need to propagate to stable,
so on the next release (2.073) enabling the runnable unittest option for all
supported modules could be attempted.

1) At the moment the js/run_examples script is injected via the navbar:

After 2.073 it can be moved to a more general place

2) It seems that the simple regex to rewrite assert's into writeln isn't good
enough for more non-trivial cases, e.g. it has problems with the following:

assert(!find!("toLower(a) == b")(s, "hello").empty);
-> writeln(!find!("toLower(a)); // b")(s, "hello").empty


3) Related: Extend the list of runnable modules:


Dec 19 2016