curl-curl/tests/data/test96
Viktor Szakats 4df7269ba8
test96: fix to accept non-unity memdump content with MSVC
In unity builds the source filename (via `__FILE__`) has no path (or
uses slashes?), while in non-unity ones it does contain backslashes
on Windows, with MSVC. Fix the test to recognize backslashes in the
`stripfile` regexp.

Seen in MSVC jobs in CI:
```diff
-MEM tool_cfgable.c[LF]
-MEM tool_paramhlp.c[LF]
-MEM tool_cfgable.c[LF]
-MEM tool_cfgable.c[LF]
-MEM tool_cfgable.c[LF]
-MEM tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_paramhlp.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
+MEM D:\a\curl\curl\src\tool_cfgable.c[LF]
```
Ref: https://github.com/curl/curl/actions/runs/20408366058/job/58641468316?pr=20061#step:13:303
Ref: https://github.com/curl/curl/actions/runs/20408522070/job/58641826216?pr=20064#step:13:298

Closes #20064
2025-12-21 12:11:56 +01:00

45 lines
674 B
XML

<?xml version="1.0" encoding="US-ASCII"?>
<testcase>
<info>
<keywords>
TrackMemory
</keywords>
</info>
# Server-side
<reply>
</reply>
# Client-side
<client>
<features>
TrackMemory
</features>
<name>
curl memory tracking operational
</name>
<command>
--version
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<file name="%LOGDIR/memdump">
MEM tool_cfgable.c
MEM tool_paramhlp.c
MEM tool_cfgable.c
MEM tool_cfgable.c
MEM tool_cfgable.c
MEM tool_cfgable.c
</file>
<stripfile>
$_ = '' if((($_ !~ /tool_paramhlp/) and ($_ !~ /tool_cfgable/)) || ($_ =~ /free\(\(nil\)\)/))
s/:\d+.*//
s:^(MEM )(.*[/\\])(.*):$1$3:
</stripfile>
</verify>
</testcase>