catchorg / catchorg/Catch2

Empty tag in test case produces crash when generating junit report

Open
#2,367 3 comments 0 reactions 0 assignees View on GitHub
Bug Revisit
Dominant language
C++
Stars
21.5k
Forks
3.5k
Avg merge
3d 16h
Merged PRs (30d)
2

Description

**Describe the bug**

If I write a test case like so:

`TEST_CASE("Test requirements of some type", "[][type]")
{...}`

where we have an empty tag "[]", the program crashes when we try to generate junit output. Normal xml output works apparently.

**Expected behavior**
I would expect no crash and that the empty tag is in the output like it is for the normal xml.

**Reproduction steps**

Build your test executable in debug mode and run

`Test.exe -r junit`

This should trigger an assertion in std::string about calling front() on an empty string.

**Platform information:**
- OS: windows 10
- Compiler+version: Microsoft (R) C/C++ Optimizing Compiler Version 19.30.30709 for x64
- Catch version: v2.13.8

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.