From e53cbf77bf43398c097556b24a5c1e6a26e56b40 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 7 Oct 2020 16:34:57 +0000 Subject: xcode12 -> xcode12.2. Prevent build warning about generic/tclStubInit.c --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5773b5b..6447b34 100644 --- a/.travis.yml +++ b/.travis.yml @@ -114,7 +114,7 @@ jobs: # Testing on Mac, various styles - name: "macOS/Xcode 12/Shared" os: osx - osx_image: xcode12 + osx_image: xcode12.2 env: - BUILD_DIR=macosx install: [] @@ -124,7 +124,7 @@ jobs: - make test styles=develop - name: "macOS/Xcode 12/Shared/Unix-like" os: osx - osx_image: xcode12 + osx_image: xcode12.2 env: - BUILD_DIR=unix # Newer MacOS versions @@ -320,6 +320,7 @@ jobs: - CFGOPT="--enable-threads --enable-symbols=mem" before_install: *makepreinst before_install: + - touch generic/tclStubInit.c - cd ${BUILD_DIR} install: - ./configure ${CFGOPT} --prefix=$HOME || (cat config.log && exit 1) -- cgit v0.12 From 5039e7ce17a9ea6c7352b39a0bd70e31433b7843 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 8 Oct 2020 09:13:57 +0000 Subject: Fix [014ade1d44]: Misleading error message when using "-path" multiple times with "glob" --- generic/tclFileName.c | 10 ++++++++-- tests/fileName.test | 6 ++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/generic/tclFileName.c b/generic/tclFileName.c index 6cdfa7e..b47035c 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -1281,7 +1281,10 @@ Tcl_GlobObjCmd( } if (dir != PATH_NONE) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "\"-directory\" cannot be used with \"-path\"", -1)); + dir == PATH_DIR + ? "\"-directory\" may only be used once" + : "\"-directory\" cannot be used with \"-path\"", + -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "GLOB", "BADOPTIONCOMBINATION", NULL); return TCL_ERROR; @@ -1306,7 +1309,10 @@ Tcl_GlobObjCmd( } if (dir != PATH_NONE) { Tcl_SetObjResult(interp, Tcl_NewStringObj( - "\"-path\" cannot be used with \"-directory\"", -1)); + dir == PATH_GENERAL + ? "\"-path\" may only be used once" + : "\"-path\" cannot be used with \"-dictionary\"", + -1)); Tcl_SetErrorCode(interp, "TCL", "OPERATION", "GLOB", "BADOPTIONCOMBINATION", NULL); return TCL_ERROR; diff --git a/tests/fileName.test b/tests/fileName.test index 725c1dd..0411ea8 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1083,6 +1083,12 @@ test filename-11.48 {Tcl_GlobCmd} -returnCodes error -body { test filename-11.49 {Tcl_GlobCmd} -returnCodes error -body { glob -types abcde -path foo -join * * } -result {bad argument to "-types": abcde} +test filename-11.50 {Tcl_GlobCmd} -returnCodes error -body { + glob -path hello -path salut * +} -result {"-path" may only be used once} +test filename-11.51 {Tcl_GlobCmd} -returnCodes error -body { + glob -dir hello -dir salut * +} -result {"-directory" may only be used once} file rename $horribleglobname globTest file delete -force $tildeglobname -- cgit v0.12