the mkdtemp tests don't clean up the directories created
authorMichael Gran <spk121@yahoo.com>
Thu, 4 Feb 2021 10:48:35 +0000 (02:48 -0800)
committerMichael Gran <spk121@yahoo.com>
Thu, 4 Feb 2021 10:48:35 +0000 (02:48 -0800)
The tests erroneously try to rmdir the template names, not the
names of the directories created.

* test-suite/tests/filesys.test ("mkdtemp"): clean up temp directories,
    and not their templates

test-suite/tests/filesys.test

index e61b96f6eb1c4d19fab38f827b3b7812b067eeb6..6fed981e52680e0ed8ec7c970196a645aac15cfe 100644 (file)
@@ -1,6 +1,6 @@
 ;;;; filesys.test --- test file system functions -*- scheme -*-
 ;;;; 
-;;;; Copyright (C) 2004, 2006, 2013, 2019 Free Software Foundation, Inc.
+;;;; Copyright (C) 2004, 2006, 2013, 2019, 2021 Free Software Foundation, Inc.
 ;;;; 
 ;;;; This library is free software; you can redistribute it and/or
 ;;;; modify it under the terms of the GNU Lesser General Public
         (throw 'unresolved)
         (let* ((template "T-XXXXXX")
                (name (mkdtemp template)))
-          (false-if-exception (rmdir template))
+          (false-if-exception (rmdir name))
           (and
            (string? name)
            (string-contains name "T-")
                (name (mkdtemp template)))
           (let* ((_stat    (stat name))
                  (result   (eqv? 'directory (stat:type _stat))))
-            (false-if-exception (rmdir template))
+            (false-if-exception (rmdir name))
             result)))))