Skip to content

Commit 2b9e9ab

Browse files
author
Harald Frostel
committed
Test for StreamString SSO bug (esp8266#6035)
1 parent a3c556e commit 2b9e9ab

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/host/core/test_string.cpp

+12
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <string.h>
1818
#include <WString.h>
1919
#include <limits.h>
20+
#include <StreamString.h>
2021

2122
TEST_CASE("String::trim", "[core][String]")
2223
{
@@ -440,3 +441,14 @@ TEST_CASE("Issue #5949 - Overlapping src/dest in replace", "[core][String]")
440441
blah.replace(blah, blah);
441442
REQUIRE(blah == "blah");
442443
}
444+
445+
446+
TEST_CASE("Issue #2736 - StreamString SSO fix", "[core][StreamString]")
447+
{
448+
StreamString s;
449+
s.print('{');
450+
s.print('\"');
451+
s.print(String("message"));
452+
s.print('\"');
453+
REQUIRE(blah == "{\"message\"");
454+
}

0 commit comments

Comments
 (0)