Skip to content

Commit 3c14ec3

Browse files
committed
Merge branch 'master' into feature/issue_11702
2 parents 7f87ae7 + 502c836 commit 3c14ec3

File tree

7 files changed

+45
-18
lines changed

7 files changed

+45
-18
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ if(NOT DEFINED MACOS_VERSION_MIN) # to allow overruling with -DMACOS_VERSION_MIN
9292
set(MACOS_VERSION_MIN 10.15) # needs std::filesystem
9393
endif()
9494
if(build_wizard AND CMAKE_SYSTEM MATCHES "Darwin")
95-
set(MACOS_VERSION_MIN 11.0) # needs Qt
95+
set(MACOS_VERSION_MIN 13.0) # needs Qt6
9696
endif()
9797
endif()
9898

src/commentcnv.l

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ static void replaceCommentMarker(yyscan_t yyscanner,std::string_view s)
16241624
}
16251625
// copy comment line to output
16261626
yyextra->outBuf+=s.substr(p);
1627-
yyextra->col+=s.substr(p).length();
1627+
yyextra->col+=static_cast<int>(s.substr(p).length());
16281628
}
16291629
16301630
static inline int computeIndent(const char *s)
@@ -1849,7 +1849,7 @@ static void insertCommentStart(yyscan_t yyscanner)
18491849
if (static_cast<int>(marker.length())<=markerSpace && !yyextra->firstIncludeLine)
18501850
{
18511851
copyToOutput(yyscanner,marker);
1852-
i+=marker.length();
1852+
i+=static_cast<int>(marker.length());
18531853
}
18541854
for (;i<contentCol;i++)
18551855
{

src/latexgen.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2520,7 +2520,7 @@ void filterLatexString(TextStream &t,const QCString &str,
25202520
default:
25212521
//if (!insideTabbing && forceBreaks && c!=' ' && *p!=' ')
25222522
if (!insideTabbing &&
2523-
((c>='A' && c<='Z' && pc!=' ' && !(pc>='A' && pc <= 'Z') && pc!='\0' && *p) || (c==':' && pc!=':') || (pc=='.' && isId(c)))
2523+
((c>='A' && c<='Z' && pc!=' ' && !(pc>='A' && pc <= 'Z') && pc!='\0' && *p) || (pc=='.' && isId(c)))
25242524
)
25252525
{
25262526
t << "\\+";
@@ -2533,6 +2533,10 @@ void filterLatexString(TextStream &t,const QCString &str,
25332533
{
25342534
t << static_cast<char>(c);
25352535
}
2536+
if (!insideTabbing && ((c==':' && *p!=':') || c=='/'))
2537+
{
2538+
t << "\\+";
2539+
}
25362540
}
25372541
}
25382542
pc = c;

src/markdown.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1755,7 +1755,7 @@ int Markdown::Private::processCodeSpan(std::string_view data,size_t offset)
17551755
if (nb>=3) // found ``` that is not at the start of the line, keep it as-is.
17561756
{
17571757
out+=data.substr(0,nb);
1758-
return nb;
1758+
return static_cast<int>(nb);
17591759
}
17601760
return 0; // no matching delimiter
17611761
}

src/regex.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ void Ex::Private::compile()
286286
prevTokenPos = tokenPos;
287287
addToken(PToken(PToken::Kind::BeginCapture));
288288
size_t id = ++nextCaptureId; // groups start at 1, 0 is whole match
289-
data.back().setValue(id);
289+
data.back().setValue(static_cast<uint16_t>(id));
290290
captureStack.push_back(id);
291291
}
292292
break;
@@ -301,7 +301,7 @@ void Ex::Private::compile()
301301
size_t id = captureStack.back();
302302
captureStack.pop_back();
303303
addToken(PToken(PToken::Kind::EndCapture));
304-
data.back().setValue(id);
304+
data.back().setValue(static_cast<uint16_t>(id));
305305
}
306306
break;
307307
case '[': // character class

testing/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# run all tests sequentially (keep for backward compatibility)
22
add_custom_target(tests
33
COMMENT "Running doxygen tests..."
4-
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --xmlxsd --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
4+
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
55
DEPENDS doxygen ${update_doxmlparser_dependency}
66
)
77

@@ -15,6 +15,6 @@ foreach(TEST_FILE ${TEST_FILES})
1515
string(REGEX REPLACE "^.*/([0-9][0-9][0-9]*).*$" "\\1" TEST_ID "${TEST_FILE}")
1616
# add a test target for each test
1717
add_test(NAME ${TEST_NAME}
18-
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --id ${TEST_ID} --xmlxsd --doxygen $<TARGET_FILE:doxygen> --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
18+
COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/testing/runtests.py --id ${TEST_ID} --doxygen $<TARGET_FILE:doxygen> --inputdir ${PROJECT_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
1919
)
2020
endforeach()

testing/runtests.py

Lines changed: 32 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,16 +79,39 @@ def __init__(self,args,test):
7979
self.test_out = self.args.outputdir+'/test_output_'+self.test_id
8080
self.prepare_test()
8181

82-
def compare_ok(self,got_file,expected_file,name):
82+
# Compares 'got_file' against 'expected_file'.
83+
# Returns (True,Msg) if there is a difference or one of the files does not exist and (False,'') otherwise
84+
def compare_ok(self, got_file, expected_file):
8385
if not os.path.isfile(got_file):
84-
return (True,'%s absent' % got_file)
85-
elif not os.path.isfile(expected_file):
86-
return (True,'%s absent' % expected_file)
87-
else:
88-
diff = xpopen('diff -b -w -u %s %s' % (got_file,expected_file))
86+
return (True, f'{got_file} absent')
87+
if not os.path.isfile(expected_file):
88+
return (True, f'{expected_file} absent')
89+
90+
def _write_filtered_tmp(src_path, tmp_path):
91+
# Read, split on tags to add newlines, drop empty lines, and write to tmp
92+
with xopen(src_path, 'r') as f, xopen(tmp_path, 'w') as out_file:
93+
filtered = [line for line in f.read().
94+
replace("<", "\n<").replace(">", ">\n").splitlines() if line.strip()]
95+
out_file.write('\n'.join(filtered)+'\n')
96+
97+
got_file_tmp = got_file + "_got"
98+
expected_file_tmp = got_file + "_ref"
99+
100+
try:
101+
for src, tmp in ((got_file, got_file_tmp), (expected_file, expected_file_tmp)):
102+
_write_filtered_tmp(src, tmp)
103+
104+
diff = xpopen(f'diff -b -w -u {got_file_tmp} {expected_file_tmp}')
89105
if diff and not diff.startswith("No differences"):
90-
return (True,'Difference between generated output and reference:\n%s' % diff)
91-
return (False,'')
106+
return (True, f'Difference between generated output and reference:\n{diff}')
107+
return (False, '')
108+
finally:
109+
# Ensure cleanup even if diff or write fails
110+
for tmp in (got_file_tmp, expected_file_tmp):
111+
try:
112+
os.remove(tmp)
113+
except OSError:
114+
pass
92115

93116
def cleanup_xmllint(self,errmsg):
94117
msg = errmsg.split('\n')
@@ -328,7 +351,7 @@ def perform_test(self,testmgr):
328351
with xopen(out_file,'w') as f:
329352
print(data,file=f)
330353
ref_file='%s/%s/%s' % (self.args.inputdir,self.test_id,check)
331-
(failed_xml,xml_msg) = self.compare_ok(out_file,ref_file,self.test_name)
354+
(failed_xml,xml_msg) = self.compare_ok(out_file,ref_file)
332355
if failed_xml:
333356
msg+= (xml_msg,)
334357
break

0 commit comments

Comments
 (0)