mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-23 21:10:29 +02:00
(execl, execlp, execle): Exercise errors where program not found.
This commit is contained in:
parent
004ad93130
commit
32bb5bd88c
1 changed files with 27 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
;;;; posix.test --- Test suite for Guile POSIX functions. -*- scheme -*-
|
||||
;;;;
|
||||
;;;; Copyright 2003 Free Software Foundation, Inc.
|
||||
;;;; Copyright 2003, 2004 Free Software Foundation, Inc.
|
||||
;;;;
|
||||
;;;; This program is free software; you can redistribute it and/or modify
|
||||
;;;; it under the terms of the GNU General Public License as published by
|
||||
|
@ -20,6 +20,32 @@
|
|||
(use-modules (test-suite lib))
|
||||
|
||||
|
||||
;;
|
||||
;; execl
|
||||
;;
|
||||
|
||||
(with-test-prefix "execl"
|
||||
(pass-if-exception "./nosuchprog" '(system-error . ".*")
|
||||
(execl "./nosuchprog" "./nosuchprog" "some arg")))
|
||||
|
||||
;;
|
||||
;; execlp
|
||||
;;
|
||||
|
||||
(with-test-prefix "execlp"
|
||||
(pass-if-exception "./nosuchprog" '(system-error . ".*")
|
||||
(execlp "./nosuchprog" "./nosuchprog" "some arg")))
|
||||
|
||||
;;
|
||||
;; execle
|
||||
;;
|
||||
|
||||
(with-test-prefix "execle"
|
||||
(pass-if-exception "./nosuchprog" '(system-error . ".*")
|
||||
(execle "./nosuchprog" '() "./nosuchprog" "some arg"))
|
||||
(pass-if-exception "./nosuchprog" '(system-error . ".*")
|
||||
(execle "./nosuchprog" '("FOO=1" "BAR=2") "./nosuchprog" "some arg")))
|
||||
|
||||
;;
|
||||
;; putenv
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue