summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml12
-rw-r--r--generic/tclFileName.c10
-rw-r--r--tests/fileName.test6
3 files changed, 21 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml
index 93063e4..9fe020b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -115,7 +115,7 @@ jobs:
# Testing on Mac, various styles
- name: "macOS/Clang/Xcode 12/Shared"
os: osx
- osx_image: xcode12
+ osx_image: xcode12.2
env:
- BUILD_DIR=macosx
install: []
@@ -125,12 +125,13 @@ jobs:
- make test styles=develop
- name: "macOS/Clang/Xcode 12/Shared/Unix-like"
os: osx
- osx_image: xcode112
+ osx_image: xcode12.2
env:
- BUILD_DIR=unix
+ - CFGOPT="--enable-dtrace"
- name: "macOS/Clang/Xcode 12/Shared/libtommath"
os: osx
- osx_image: xcode12
+ osx_image: xcode12.2
env:
- BUILD_DIR=macosx
install: []
@@ -141,10 +142,10 @@ jobs:
- libtommath
- name: "macOS/Clang++/Xcode 12/Shared"
os: osx
- osx_image: xcode12
+ osx_image: xcode12.2
env:
- BUILD_DIR=unix
- - CFGOPT="CC=clang++ --enable-framework CFLAGS=-Dregister=dont+use+register CPPFLAGS=-D__private_extern__=extern"
+ - CFGOPT="CC=clang++ --enable-framework --enable-dtrace CFLAGS=-Dregister=dont+use+register CPPFLAGS=-D__private_extern__=extern"
script:
- make all tcltest
# Newer MacOS versions
@@ -419,6 +420,7 @@ jobs:
script:
- make dist
before_install:
+ - touch generic/tclStubInit.c generic/tclOOStubInit.c generic/tclOOScript.h
- cd ${BUILD_DIR}
install:
- mkdir "$HOME/install dir"
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index eb110e0..5e3e44a 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -1285,7 +1285,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;
@@ -1310,7 +1313,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 d4dfd9a..c73efac 100644
--- a/tests/fileName.test
+++ b/tests/fileName.test
@@ -1084,6 +1084,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