Author: koutou
Date: Sat Mar 21 20:27:01 2009
New Revision: 5905
Modified:
trunk/test/test-uim-util.scm
trunk/test/util/test-uim.scm
Log:
* test/test-uim-util.scm: move getenv, setenv and unsetenv
tests to ...
* test/util/test-uim.scm: ... here.
Modified: trunk/test/test-uim-util.scm
==============================================================================
--- trunk/test/test-uim-util.scm (original)
+++ trunk/test/test-uim-util.scm Sat Mar 21 20:27:01 2009
@@ -41,32 +41,6 @@
(uim '(require "util.scm"))
(uim '(define lst '(1 2 3 4)))))
- ("test getenv"
- (assert-equal (sys-getenv "PWD")
- (uim '(getenv "PWD")))
- (assert-false (uim-bool '(getenv "UIM_NONEXISTING_ENV"))))
-
- ("test setenv"
- (assert-false (uim-bool '(getenv "UIM_NONEXISTING_ENV")))
- (assert-true (uim-bool '(setenv "UIM_NONEXISTING_ENV" "FOO" #f)))
- (assert-equal "FOO"
- (uim '(getenv "UIM_NONEXISTING_ENV")))
- (assert-true (uim-bool '(setenv "UIM_NONEXISTING_ENV" "BAR" #f)))
- (assert-equal "FOO"
- (uim '(getenv "UIM_NONEXISTING_ENV")))
- (assert-true (uim-bool '(setenv "UIM_NONEXISTING_ENV" "BAR" #t)))
- (assert-equal "BAR"
- (uim '(getenv "UIM_NONEXISTING_ENV"))))
-
- ("test unsetenv"
- (assert-true (uim-bool '(setenv "UIM_NONEXISTING_ENV" "BAR" #t)))
- (assert-equal "BAR"
- (uim '(getenv "UIM_NONEXISTING_ENV")))
- (assert-true (uim-bool '(unsetenv "UIM_NONEXISTING_ENV")))
- (assert-false (uim-bool '(getenv "UIM_NONEXISTING_ENV")))
- (assert-true (uim-bool '(unsetenv "UIM_NONEXISTING_ENV")))
- (assert-false (uim-bool '(getenv "UIM_NONEXISTING_ENV"))))
-
;; See "Specification changes of utility procedures" of doc/COMPATIBILITY
;; ("test string-split (uim 1.4)"
;; ;; ordinary split
Modified: trunk/test/util/test-uim.scm
==============================================================================
--- trunk/test/util/test-uim.scm (original)
+++ trunk/test/util/test-uim.scm Sat Mar 21 20:27:01 2009
@@ -99,4 +99,33 @@
(closure)))
#f)
+(define (test-getenv)
+ (assert-uim-equal (sys-getenv "PWD")
+ '(getenv "PWD"))
+ (assert-uim-false '(getenv "UIM_NONEXISTING_ENV"))
+ #f)
+
+(define (test-setenv)
+ (assert-uim-false '(getenv "UIM_NONEXISTING_ENV"))
+ (assert-uim-true '(setenv "UIM_NONEXISTING_ENV" "FOO" #f))
+ (assert-uim-equal "FOO"
+ '(getenv "UIM_NONEXISTING_ENV"))
+ (assert-uim-true '(setenv "UIM_NONEXISTING_ENV" "BAR" #f))
+ (assert-uim-equal "FOO"
+ '(getenv "UIM_NONEXISTING_ENV"))
+ (assert-uim-true '(setenv "UIM_NONEXISTING_ENV" "BAR" #t))
+ (assert-uim-equal "BAR"
+ '(getenv "UIM_NONEXISTING_ENV"))
+ #f)
+
+(define (test-unsetenv)
+ (assert-uim-true '(setenv "UIM_NONEXISTING_ENV" "BAR" #t))
+ (assert-uim-equal "BAR"
+ '(getenv "UIM_NONEXISTING_ENV"))
+ (assert-uim-true '(unsetenv "UIM_NONEXISTING_ENV"))
+ (assert-uim-false '(getenv "UIM_NONEXISTING_ENV"))
+ (assert-uim-true '(unsetenv "UIM_NONEXISTING_ENV"))
+ (assert-uim-false '(getenv "UIM_NONEXISTING_ENV"))
+ #f)
+
(provide "test/util/test-uim")