core::file: add docunit for expected behavior on deleting existing folders
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 9 Sep 2016 15:10:01 +0000 (11:10 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 9 Sep 2016 15:34:08 +0000 (11:34 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/core/file.nit

index d19bb8e..9e23be2 100644 (file)
@@ -717,6 +717,12 @@ class Path
        # var path = "/does/not/exists/".to_path
        # path.rmdir
        # assert path.last_error != null
        # var path = "/does/not/exists/".to_path
        # path.rmdir
        # assert path.last_error != null
+       #
+       # path = "/tmp/path/to/create".to_path
+       # path.to_s.mkdir
+       # assert path.exists
+       # path.rmdir
+       # assert path.last_error == null
        # ~~~
        fun rmdir
        do
        # ~~~
        fun rmdir
        do