Tk Source Code

View Ticket
Login
Ticket UUID: 7e5f72c9dde02947800d31b955f583db051f1e6a
Title: Test script option.test deletes file option.file3 in Tk distribution
Type: Bug Version: 8.6.13
Submitter: erikleunissen Created on: 2024-01-24 11:32:49
Subsystem: 86. Test Tools Assigned To: fvogel
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2024-01-27 09:10:25
Resolution: Fixed Closed By: fvogel
    Closed on: 2024-01-27 09:10:25
Description:
The summary line says it all.

Observed under Windows.
User Comments: fvogel added on 2024-01-27 09:10:25:
Thanks for the feedback, and for the original report as well. Fix is now merged.

erikleunissen added on 2024-01-27 09:02:45:
Right. Just confirming that this change fixes the issue here too.

fvogel added on 2024-01-26 21:07:21:

OK. When running the test suite the way you do it I can reproduce.

The fix is very simple: [e259ac2d64]

This problem was introduced in [16df5a3f] back in 2015. You are using an original way to run the test suite, which explains IMO why this issue was left unfound for 8 years.


fvogel added on 2024-01-26 10:12:53:
I'm running the tests from TK_SOURCE_DIR\win

This should explain thé différence. I'll have a further look.

erikleunissen added on 2024-01-26 10:02:40:
Just did the same in a TK_SOURCE_DIR copied to my local hard drive: same result.

erikleunissen added on 2024-01-26 09:51:36:
Hmm, strange. I'm doing the following:

TK_SOURCE_DIR=your_place

1. in Windows Explorer go to $TK_SOURCEDIR\tests
2. do <Shift + Right Mouse Button Click>
3. in the context menu choose "Open command window here"
       (cmd.exe launches ...)
4. inside cmd.exe issue:
> tclsh86 all.tcl

or

> tclsh86 all.tcl -file option.test

Maybe it matters (I can't imagine how though) that:
- my TK_SOURCE_DIR is on a connected network drive, while the invoked tclsh lives on a local hard disk.
- I'm using Windows 7 (Yes I know, not suppported anymore by Microsoft)

I just did all this again, with the same result: file option.file3 is gone.

fvogel added on 2024-01-25 20:40:05:
Hmmm. Can't reproduce.

There is an "option.file3" in ./tests, yes.

For me, running the test suite with -file option.test does not remove ./tests/option.file3 from my disk.

However I see in option.test the suspicious line 407 which reads:

      set option4 [makeFile {} option.file3]

This should indeed create a file "option.file3" with an empty content.

From which directory are you running the tests? Could you provide a bit more information about how to reproduce please?