Skip to content

Commit

Permalink
Fix sys-normalize-pathname test to avoid using $HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
shirok committed May 24, 2012
1 parent 0e669ec commit d931685
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2012-05-24 Shiro Kawai <shiro@acm.org>

* test/system.scm (normalize): Avoid using $HOME to calculate the
expected value of tilde-expansion, for $HOME may be altered
during testing. Use getpwuid instead.

2012-05-12 Shiro Kawai <shiro@acm.org>

* src/Makefile.in: If install location was redirected by DESTDIR,
Expand Down
2 changes: 1 addition & 1 deletion test/system.scm
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
(gauche.os.windows #t)
(else
(test* "normalize"
(n (string-append (get-command-output "echo $HOME") "/abc"))
(n (string-append (slot-ref (sys-getpwuid (sys-getuid)) 'dir) "/abc"))
(sys-normalize-pathname "~/abc" :expand #t))))

(test* "normalize" (n "/a/b/c/d/e")
Expand Down

0 comments on commit d931685

Please sign in to comment.