diff options
Diffstat (limited to 'libstdc++-v3/testsuite/21_strings/assign.cc')
-rw-r--r-- | libstdc++-v3/testsuite/21_strings/assign.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/21_strings/assign.cc b/libstdc++-v3/testsuite/21_strings/assign.cc index 1d7db1c16e4..fb1ec09b5a3 100644 --- a/libstdc++-v3/testsuite/21_strings/assign.cc +++ b/libstdc++-v3/testsuite/21_strings/assign.cc @@ -37,6 +37,13 @@ test01() if (i != string::npos) aux.assign(aux, i + 1, string::npos); VERIFY(aux == "Hawaii"); + + aux = strlit; + i = aux.rfind("r/"); + if (i != string::npos) + aux.assign(aux, i + 1, string::npos); + VERIFY(aux.c_str()[9] == 'B'); + VERIFY(aux == "/Hanalei Bay/Kauai/Hawaii"); } // assign(const basic_string& __str, size_type __pos, size_type __n) |