Raymond Toy pushed to branch issue-375-mkstemp-return-filename at cmucl / cmucl
Commits:
-
15501db4
by Raymond Toy at 2025-02-01T09:11:11-08:00
1 changed file:
Changes:
... | ... | @@ -30,9 +30,13 @@ |
30 | 30 | (define-test mkstemp.bad-template
|
31 | 31 | (:tag :issues)
|
32 | 32 | (multiple-value-bind (fd errno)
|
33 | - (unix::unix-mkstemp "test-XXXXX")
|
|
33 | + (unix::unix-mkstemp "test-")
|
|
34 | 34 | ;; The template doesn't have enough X's so the FD should be NIL,
|
35 | 35 | ;; and a positive Unix errno value should be returned.
|
36 | + ;;
|
|
37 | + ;; Note that Darwin allows any number of X's in the template but
|
|
38 | + ;; Linux requires exactly 6. Just test with no X's to handle all
|
|
39 | + ;; OSes.
|
|
36 | 40 | (assert-false fd)
|
37 | 41 | (assert-true (and (integerp errno) (plusp errno)))))
|
38 | 42 | |
... | ... | @@ -58,7 +62,8 @@ |
58 | 62 | (define-test mkdtemp.bad-template
|
59 | 63 | (:tag :issues)
|
60 | 64 | (multiple-value-bind (result errno)
|
61 | - (unix::unix-mkdtemp "dir-XXXXX")
|
|
65 | + (unix::unix-mkdtemp "dir-")
|
|
66 | + ;; No X's in template, like for mkstemp.bad-template test.
|
|
62 | 67 | (assert-false result)
|
63 | 68 | (assert-true (and (integerp errno) (plusp errno)))))
|
64 | 69 |