summaryrefslogtreecommitdiff
path: root/Build/source/texk/xdvik/tests
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-12-18 15:44:44 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-12-18 15:44:44 +0000
commita1c8d1d0cc4891a9bc9443ef07cd344e6bde8c9e (patch)
tree24ef65a754e0956ffdae342e6bb3c46e6a141313 /Build/source/texk/xdvik/tests
parent79e1fa948e90454e8289a4d5b2eff8a34f49108f (diff)
bug fix for 'make check' in texk/xdvk/ with abs srcdir
git-svn-id: svn://tug.org/texlive/trunk@16446 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/xdvik/tests')
-rw-r--r--Build/source/texk/xdvik/tests/test_string_utils.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/Build/source/texk/xdvik/tests/test_string_utils.c b/Build/source/texk/xdvik/tests/test_string_utils.c
index 086d54dad13..b3cb9a70cf4 100644
--- a/Build/source/texk/xdvik/tests/test_string_utils.c
+++ b/Build/source/texk/xdvik/tests/test_string_utils.c
@@ -321,8 +321,13 @@ static Boolean test_expand_filename(int verbose)
globals.dvi_file.dirname = xstrcat(globals.dvi_file.dirname, "/");
testpath2 = expand_filename(__FILE__, USE_DVI_PATH);
- currpath = xstrcat(currpath, "/");
- currpath = xstrcat(currpath, __FILE__);
+ if (__FILE__[0] == '/') {
+ free(currpath);
+ currpath = xstrdup(__FILE__);
+ } else {
+ currpath = xstrcat(currpath, "/");
+ currpath = xstrcat(currpath, __FILE__);
+ }
return test_str_equality(verbose, testpath1, currpath) \
&& test_str_equality(verbose, testpath2, currpath);