Skip to content

Commit

Permalink
Test for StreamString SSO bug (esp8266#6035)
Browse files Browse the repository at this point in the history
  • Loading branch information
Harald Frostel committed May 2, 2019
1 parent a3c556e commit 2b9e9ab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/host/core/test_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <string.h>
#include <WString.h>
#include <limits.h>
#include <StreamString.h>

TEST_CASE("String::trim", "[core][String]")
{
Expand Down Expand Up @@ -440,3 +441,14 @@ TEST_CASE("Issue #5949 - Overlapping src/dest in replace", "[core][String]")
blah.replace(blah, blah);
REQUIRE(blah == "blah");
}


TEST_CASE("Issue #2736 - StreamString SSO fix", "[core][StreamString]")
{
StreamString s;
s.print('{');
s.print('\"');
s.print(String("message"));
s.print('\"');
REQUIRE(blah == "{\"message\"");
}

0 comments on commit 2b9e9ab

Please sign in to comment.