aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/28_regex
diff options
context:
space:
mode:
authorTim Shen <timshen@google.com>2014-11-25 05:43:04 +0000
committerTim Shen <timshen@gcc.gnu.org>2014-11-25 05:43:04 +0000
commit02ba3fc22d5b4101f99bd5b0cc5101a04cdd0eb2 (patch)
treeb5ca80b80eb4fcbdf7b29b72f70f709d6d1c5f9f /libstdc++-v3/testsuite/28_regex
parent5534b254aeaec496b1aa0cf9f9c951c9debfa97d (diff)
downloadgcc-02ba3fc22d5b4101f99bd5b0cc5101a04cdd0eb2.zip
gcc-02ba3fc22d5b4101f99bd5b0cc5101a04cdd0eb2.tar.gz
gcc-02ba3fc22d5b4101f99bd5b0cc5101a04cdd0eb2.tar.bz2
re PR libstdc++/63920 (Any regular expression should not match an empty sequence if match_not_null is specified)
PR libstdc++/63920 * include/bits/regex_executor.h: Make _M_begin non const. * include/bits/regex_executor.tcc (_Executor<>::_M_search): Increase _M_begin in search algorithm, so that _M_begin is treated as "current start position" for each search iteration. * testsuite/28_regex/algorithms/regex_search/ecma/flags.cc: New testcase. From-SVN: r218037
Diffstat (limited to 'libstdc++-v3/testsuite/28_regex')
-rw-r--r--libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc
index 45ad0f6..6b038ee 100644
--- a/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc
+++ b/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/ecma/flags.cc
@@ -65,6 +65,8 @@ test01()
regex_constants::match_prev_avail));
VERIFY( regex_search_debug("ba"+1, regex("\\Ba"),
regex_constants::match_prev_avail));
+ // PR libstdc++/63920
+ VERIFY(!regex_search_debug("a", regex("b*"), regex_constants::match_not_null));
}
int