xaizek / vifm (License: GPLv2+) (since 2018-12-07)
Vifm is a file manager with curses interface, which provides Vi[m]-like environment for managing objects within file systems, extended with some useful ideas from mutt.
Commit fc03c686156396dd6c674490120f2171e380c0d3

Fix new failures on Wine 10.0
Introduce not_wine32() predicate to be more selective about skipping
tests and only disable it on 32-bit version if 64-bit Wine doesn't have
the same problem.
Author: xaizek
Author date (UTC): 2025-11-16 14:31
Committer name: xaizek
Committer date (UTC): 2025-12-21 10:43
Parent(s): 175ffa79fa226b83b9d3a787e8cc532705a81971
Signing key: 99DC5E4DB05F6BE2
Tree: 68117b27834513ca67da30351f9d30a9af406734
File Lines added Lines deleted
tests/commands/call.c 4 1
tests/misc/builtin_functions.c 8 5
tests/test-support/test-utils.c 12 0
tests/test-support/test-utils.h 4 0
File tests/commands/call.c changed (mode: 100644) (index 43cfcfd24..a0d2ddc65)
... ... TEST(good_call)
46 46 check_and_remove_file(); check_and_remove_file();
47 47 } }
48 48
49 TEST(good_call_with_comment)
49 // Disabled on Wine because when running both good_call() and
50 // good_call_with_comment() on Wine 10.0 only the first one seems to work
51 // (doesn't matter which one). Hard to say why.
52 TEST(good_call_with_comment, IF(not_wine))
50 53 { {
51 54 assert_success(cmds_dispatch1("call system('echo call> file') \" comment", assert_success(cmds_dispatch1("call system('echo call> file') \" comment",
52 55 &lwin, CIT_COMMAND)); &lwin, CIT_COMMAND));
File tests/misc/builtin_functions.c changed (mode: 100644) (index 89766a59b..654514c4e)
... ... TEST(expand_does_not_need_double_escaping)
119 119 ASSERT_OK("expand('%c:p:gs!/!\\\\!')", "\\\\dir\\\\file"); ASSERT_OK("expand('%c:p:gs!/!\\\\!')", "\\\\dir\\\\file");
120 120 } }
121 121
122 TEST(system_catches_stdout)
122 /* 32-bit Wine doesn't catch output or maybe every time. */
123 TEST(system_catches_stdout, IF(not_wine32))
123 124 { {
124 125 ASSERT_OK("system('echo a')", "a"); ASSERT_OK("system('echo a')", "a");
125 126 } }
126 127
127 TEST(system_catches_stderr)
128 /* 32-bit Wine doesn't catch output or maybe every time. */
129 TEST(system_catches_stderr, IF(not_wine32))
128 130 { {
129 131 #ifndef _WIN32 #ifndef _WIN32
130 132 ASSERT_OK("system('echo a 1>&2')", "a"); ASSERT_OK("system('echo a 1>&2')", "a");
 
... ... TEST(system_catches_stderr)
135 137 #endif #endif
136 138 } }
137 139
138 TEST(system_catches_stdout_and_err)
140 /* 32-bit Wine doesn't catch output or maybe every time. */
141 TEST(system_catches_stdout_and_err, IF(not_wine32))
139 142 { {
140 143 #ifndef _WIN32 #ifndef _WIN32
141 144 ASSERT_OK("system('echo a && echo b 1>&2')", "a\nb"); ASSERT_OK("system('echo a && echo b 1>&2')", "a\nb");
 
... ... TEST(system_catches_stdout_and_err)
146 149 #endif #endif
147 150 } }
148 151
149 /* Something doesn't work on 32-bit Wine. */
150 TEST(term_catches_stdout, IF(not_wine))
152 /* 32-bit Wine doesn't catch output or maybe every time. */
153 TEST(term_catches_stdout, IF(not_wine32))
151 154 { {
152 155 ASSERT_OK("term('echo a')", "a"); ASSERT_OK("term('echo a')", "a");
153 156 } }
File tests/test-support/test-utils.c changed (mode: 100644) (index 27d5af577..dbb080e40)
... ... not_wine(void)
574 574 #endif #endif
575 575 } }
576 576
577 int
578 not_wine32(void)
579 {
580 #if defined(_WIN32) && !defined(__x86_64__)
581 if(!not_wine())
582 {
583 return 0;
584 }
585 #endif
586 return 1;
587 }
588
577 589 int int
578 590 regular_unix_user(void) regular_unix_user(void)
579 591 { {
File tests/test-support/test-utils.h changed (mode: 100644) (index 2fbda41d4..520346545)
... ... int not_windows(void);
116 116 * returned. */ * returned. */
117 117 int not_wine(void); int not_wine(void);
118 118
119 /* Whether running outside of WINE or in 32-bit WINE. Returns non-zero if so,
120 * otherwise zero is returned. */
121 int not_wine32(void);
122
119 123 /* Attempts to switch to UTF-8 capable locale. Use utf8_locale() to check if /* Attempts to switch to UTF-8 capable locale. Use utf8_locale() to check if
120 124 * successful. */ * successful. */
121 125 void try_enable_utf8_locale(void); void try_enable_utf8_locale(void);
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vifm

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vifm

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master