@@ -12,12 +12,11 @@ spawn $env(TESTS_DIR)env
1212expect "Testing Env module functions..." {
1313 expect -re "Testing Env.cwd!:" {
1414 # Match cwd path that has ArbitraryBytes with non-empty list of integers
15- # Use curly braces for the regex pattern to avoid Tcl interpretation of [ and ]
16- expect -re {cwd: \(@InternalPath \(ArbitraryBytes \[\d+(, \d+)*\]\)\)} {
15+ expect -re {cwd: /[^\r\n]*\r\n} {
1716
1817 expect -re "Testing Env.exe_path!:" {
1918 # Match exe_path with any valid format
20- expect -re {exe_path: \(@InternalPath \(.*\[\d+(, \d+)*\].*\)\) } {
19+ expect -re {exe_path: /[^\r\n]*\r\n } {
2120
2221 expect -re "Testing Env.platform!:" {
2322 # Match platform info with any arch and OS
@@ -28,19 +27,18 @@ expect "Testing Env module functions..." {
2827 # Match environment variables count as non-zero number
2928 expect -re {Environment variables count: (\d+)} {
3029 set env_count $expect_out(1,string)
31- if {$env_count == 0 } {
32- puts stderr "\nExpect script failed: environment variable count is zero ."
30+ if {$env_count < 1 } {
31+ puts stderr "\nExpect script failed: environment variable count is $env_count ."
3332 exit 1
3433 }
35-
3634 # Match sample environment variables with non-empty strings
3735 # Literal brackets [], parentheses (), and quotes "" need escaping or careful handling
3836 expect -re {Sample environment variables:\[\("\w+", ".*"\)(, \("\w+", ".*"\))*\]} {
3937
4038 expect -re "Testing Env.set_cwd!:" {
4139 # Match changed directory path with non-empty list of integers
42- expect -re {Changed current directory to: \(@InternalPath \(ArbitraryBytes \[\d+(, \d+)*\]\)\) } {
43-
40+ expect -re {Changed current directory to: /[^\r\n]*\r\n } {
41+
4442 expect "All tests executed!" {
4543 expect eof {
4644 check_exit_and_segfault
0 commit comments