@@ -237,7 +237,13 @@ def test_same_name_header(record_property, tmpdir):
237237 assert stderr == ""
238238
239239def test_pragma_once_matching (record_property , tmpdir ):
240- if platform .system () == "win32" :
240+ test_dir = os .path .join (tmpdir , "test_dir" )
241+ test_subdir = os .path .join (test_dir , "test_subdir" )
242+
243+ test_file = os .path .join (test_dir , "test.c" )
244+ once_header = os .path .join (test_dir , "once.h" )
245+
246+ if platform .system () == "Windows" :
241247 names_to_test = [
242248 '"once.h"' ,
243249 '"Once.h"' ,
@@ -251,21 +257,21 @@ def test_pragma_once_matching(record_property, tmpdir):
251257 '"test_subdir/../Once.h"' ,
252258 '"Test_Subdir/../once.h"' ,
253259 '"Test_Subdir/../Once.h"' ,
260+ f"\" { test_dir } /once.h\" " ,
261+ f"\" { test_dir } /Once.h\" " ,
262+ f"<{ test_dir } /once.h>" ,
263+ f"<{ test_dir } /Once.h>" ,
254264 ]
255265 else :
256266 names_to_test = [
257267 '"once.h"' ,
258268 '<once.h>' ,
259269 '"../test_dir/once.h"' ,
260270 '"test_subdir/../once.h"' ,
271+ f"\" { test_dir } /once.h\" " ,
272+ f"<{ test_dir } /once.h>" ,
261273 ]
262274
263- test_dir = os .path .join (tmpdir , "test_dir" )
264- test_subdir = os .path .join (test_dir , "test_subdir" )
265-
266- test_file = os .path .join (test_dir , "test.c" )
267- once_header = os .path .join (test_dir , "once.h" )
268-
269275 os .mkdir (test_dir )
270276 os .mkdir (test_subdir )
271277
0 commit comments