Skip to content

Commit

Permalink
(cherry-pick): Merge branch less_tests_constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
jan.nijtmans committed Jan 6, 2025
1 parent b77df0d commit bfc48c0
Show file tree
Hide file tree
Showing 18 changed files with 221 additions and 167 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl 8.6
- name: Checkout Tcl 8.7
uses: actions/checkout@v4
with:
repository: tcltk/tcl
Expand Down Expand Up @@ -139,15 +139,15 @@ jobs:
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl
- name: Checkout Tcl 8.7
uses: actions/checkout@v4
with:
repository: tcltk/tcl
ref: core-8-branch
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev
sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev xfonts-75dpi xfonts-100dpi xfonts-scalable libxfont2 unifont
mkdir "$HOME/install dir"
touch tk/doc/man.macros tk/generic/tkStubInit.c
echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/linux-with-tcl86-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ jobs:
compiler:
- "gcc"
- "clang"
cfgopt:
config:
- ""
- "CFLAGS=-DTK_NO_DEPRECATED=1"
- "--disable-xft"
- "--disable-xss"
- "--enable-symbols"
steps:
- name: Checkout
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl
- name: Checkout Tcl 8.6
uses: actions/checkout@v4
with:
repository: tcltk/tcl
Expand All @@ -51,9 +51,9 @@ jobs:
echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV
working-directory: "."
env:
CFGOPT: ${{ matrix.cfgopt }}
CFGOPT: ${{ matrix.config }}
COMPILER: ${{ matrix.compiler }}
OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }}
OPTS: ${{ matrix.compiler }}${{ matrix.config }}
- name: Configure and Build Tcl
run: |
./configure $CFGOPT "--prefix=$HOME/install dir" || {
Expand All @@ -67,7 +67,7 @@ jobs:
}
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
working-directory: tcl/unix
- name: Configure (opts=${{ matrix.cfgopt }})
- name: Configure (opts=${{ matrix.config }})
run: |
./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH --disable-zipfs "--prefix=$HOME/install dir" || {
cat config.log
Expand Down Expand Up @@ -110,31 +110,31 @@ jobs:
matrix:
compiler:
- "gcc"
cfgopt:
config:
- ""
- "--disable-xft"
- "--enable-symbols"
steps:
- name: Checkout
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl
- name: Checkout Tcl 8.6
uses: actions/checkout@v4
with:
repository: tcltk/tcl
ref: core-8-6-branch
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev
sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev xfonts-75dpi xfonts-100dpi xfonts-scalable libxfont2 unifont
mkdir "$HOME/install dir"
touch tk/doc/man.macros tk/generic/tkStubInit.c
echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV
echo "CC=$COMPILER" >> $GITHUB_ENV
working-directory: "."
env:
CFGOPT: ${{ matrix.cfgopt }}
CFGOPT: ${{ matrix.config }}
COMPILER: ${{ matrix.compiler }}
- name: Configure and Build Tcl
run: |
Expand All @@ -149,7 +149,7 @@ jobs:
}
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
working-directory: tcl/unix
- name: Configure ${{ matrix.cfgopt }}
- name: Configure ${{ matrix.config }}
run: |
./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || {
cat config.log
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/linux-with-tcl9-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ jobs:
compiler:
- "gcc"
- "clang"
cfgopt:
config:
- ""
- "CFLAGS=-DTK_NO_DEPRECATED=1"
- "--disable-xft"
- "--disable-xss"
- "--enable-symbols"
steps:
- name: Checkout
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl
- name: Checkout Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
Expand All @@ -51,9 +51,9 @@ jobs:
echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV
working-directory: "."
env:
CFGOPT: ${{ matrix.cfgopt }}
CFGOPT: ${{ matrix.config }}
COMPILER: ${{ matrix.compiler }}
OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }}
OPTS: ${{ matrix.compiler }}${{ matrix.config }}
- name: Configure and Build Tcl
run: |
./configure $CFGOPT "--prefix=$HOME/install dir" || {
Expand All @@ -67,7 +67,7 @@ jobs:
}
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
working-directory: tcl/unix
- name: Configure (opts=${{ matrix.cfgopt }})
- name: Configure (opts=${{ matrix.config }})
run: |
./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || {
cat config.log
Expand Down Expand Up @@ -110,31 +110,31 @@ jobs:
matrix:
compiler:
- "gcc"
cfgopt:
config:
- ""
- "--disable-xft"
- "--enable-symbols"
steps:
- name: Checkout
- name: Checkout Tk
uses: actions/checkout@v4
with:
path: tk
- name: Checkout Tcl
- name: Checkout Tcl 9.0
uses: actions/checkout@v4
with:
repository: tcltk/tcl
ref: main
path: tcl
- name: Setup Environment (compiler=${{ matrix.compiler }})
run: |
sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev
sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev xfonts-75dpi xfonts-100dpi xfonts-scalable libxfont2 unifont
mkdir "$HOME/install dir"
touch tk/doc/man.macros tk/generic/tkStubInit.c
echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV
echo "CC=$COMPILER" >> $GITHUB_ENV
working-directory: "."
env:
CFGOPT: ${{ matrix.cfgopt }}
CFGOPT: ${{ matrix.config }}
COMPILER: ${{ matrix.compiler }}
- name: Configure and Build Tcl
run: |
Expand All @@ -149,7 +149,7 @@ jobs:
}
echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV
working-directory: tcl/unix
- name: Configure ${{ matrix.cfgopt }}
- name: Configure ${{ matrix.config }}
run: |
./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || {
cat config.log
Expand Down
30 changes: 15 additions & 15 deletions macosx/tkMacOSXTest.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
* Forward declarations of procedures defined later in this file:
*/

static Tcl_ObjCmdProc PressButtonObjCmd;
static Tcl_ObjCmdProc MoveMouseObjCmd;
static Tcl_ObjCmdProc InjectKeyEventObjCmd;
static Tcl_ObjCmdProc MenuBarHeightObjCmd;
static Tcl_ObjCmdProc TestpressbuttonObjCmd;
static Tcl_ObjCmdProc TestmovemouseObjCmd;
static Tcl_ObjCmdProc TestinjectkeyeventObjCmd;
static Tcl_ObjCmdProc TestmenubarheightObjCmd;


/*
Expand Down Expand Up @@ -52,17 +52,17 @@ TkplatformtestInit(
* Add commands for platform specific tests on MacOS here.
*/

Tcl_CreateObjCommand(interp, "pressbutton", PressButtonObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "movemouse", MoveMouseObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "injectkeyevent", InjectKeyEventObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "menubarheight", MenuBarHeightObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testpressbutton", TestpressbuttonObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testmovemouse", TestmovemouseObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testinjectkeyevent", TestinjectkeyeventObjCmd, NULL, NULL);
Tcl_CreateObjCommand(interp, "testmenubarheight", TestmenubarheightObjCmd, NULL, NULL);
return TCL_OK;
}

/*
*----------------------------------------------------------------------
*
* MenuBarHeightObjCmd --
* TestmenubarheightObjCmd --
*
* This procedure calls [NSMenu menuBarHeight] and returns the result
* as an integer. Windows can never be placed to overlap the MenuBar,
Expand All @@ -78,7 +78,7 @@ TkplatformtestInit(
*/

static int
MenuBarHeightObjCmd(
TestmenubarheightObjCmd(
TCL_UNUSED(void *), /* Not used. */
Tcl_Interp *interp, /* Not used. */
TCL_UNUSED(int), /* Not used. */
Expand Down Expand Up @@ -124,7 +124,7 @@ TkTestLogDisplay(
/*
*----------------------------------------------------------------------
*
* PressButtonObjCmd --
* TestpressbuttonObjCmd --
*
* This Tcl command simulates a button press at a specific screen
* location. It injects NSEvents into the NSApplication event queue, as
Expand All @@ -143,7 +143,7 @@ TkTestLogDisplay(
*/

static int
PressButtonObjCmd(
TestpressbuttonObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
int objc,
Expand Down Expand Up @@ -225,7 +225,7 @@ PressButtonObjCmd(
/*
*----------------------------------------------------------------------
*
* MoveMouseObjCmd --
* TestmovemouseObjCmd --
*
* This Tcl command simulates a mouse motion to a specific screen
* location. It injects an NSEvent into the NSApplication event queue,
Expand All @@ -242,7 +242,7 @@ PressButtonObjCmd(
*/

static int
MoveMouseObjCmd(
TestmovemouseObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
int objc,
Expand Down Expand Up @@ -302,7 +302,7 @@ MoveMouseObjCmd(
}

static int
InjectKeyEventObjCmd(
TestinjectkeyeventObjCmd(
TCL_UNUSED(void *),
Tcl_Interp *interp,
int objc,
Expand Down
6 changes: 3 additions & 3 deletions tests/bind.test
Original file line number Diff line number Diff line change
Expand Up @@ -6931,7 +6931,7 @@ proc testKey {window event type mods} {
}
set save $keyInfo
set keyInfo {}
set injectcmd [list injectkeyevent $type $numericKeysym]
set injectcmd [list testinjectkeyevent $type $numericKeysym]
foreach {option} $mods {
lappend injectcmd $option
}
Expand Down Expand Up @@ -7002,7 +7002,7 @@ test bind-35.2 {Can bind to function keys} -constraints {aqua} -body {
set numericKeysym {}
focus -force .
event generate . <F2>
injectkeyevent press $numericKeysym -function
testinjectkeyevent press $numericKeysym -function
vwait keyInfo
return $keyInfo
} -cleanup {
Expand Down Expand Up @@ -7032,7 +7032,7 @@ test bind-35.3 {Events agree for modifier keys} -constraints {aqua} -setup {
vwait keyInfo
}
set save $keyInfo
injectkeyevent flagschanged $numericKeysym [lindex $event 1]
testinjectkeyevent flagschanged $numericKeysym [lindex $event 1]
if {$keyInfo == {}} {
vwait keyInfo
}
Expand Down
Loading

0 comments on commit bfc48c0

Please sign in to comment.