1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00

the mkdtemp tests don't clean up the directories created

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
This commit is contained in:
Michael Gran 2021-02-04 02:48:35 -08:00
parent f5b3506ece
commit 56e3adefc9

View 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
@ -245,7 +245,7 @@
(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-")
@ -263,5 +263,5 @@
(name (mkdtemp template)))
(let* ((_stat (stat name))
(result (eqv? 'directory (stat:type _stat))))
(false-if-exception (rmdir template))
(false-if-exception (rmdir name))
result)))))