about summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-08-19 16:35:51 +0000
committerbors <bors@rust-lang.org>2014-08-19 16:35:51 +0000
commit3f5d0b5b6cd4994c719d57a778697124348a4c1c (patch)
tree6e753ad477ef887e7e313cdbd3a0bc3a55edf03d /src/libcoretest
parentc8835104797335818bc1d5b0df61ce9f5907cd16 (diff)
parent3b0084e834efb461a72391166a667cedb5581f53 (diff)
downloadrust-3f5d0b5b6cd4994c719d57a778697124348a4c1c.tar.gz
rust-3f5d0b5b6cd4994c719d57a778697124348a4c1c.zip
auto merge of #16590 : nham/rust/str_searcher_underflow, r=alexcrichton
This incidentally fixes #16589, because it will cause `MatchIndices` to use `NaiveSearcher` instead of `TwoWaySearcher`, but I'm not sure #16589 should be closed until the underlying problem in `TwoWaySearcher` is found.
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/lib.rs1
-rw-r--r--src/libcoretest/str.rs14
2 files changed, 15 insertions, 0 deletions
diff --git a/src/libcoretest/lib.rs b/src/libcoretest/lib.rs
index 3864321586c..7866d2f4a11 100644
--- a/src/libcoretest/lib.rs
+++ b/src/libcoretest/lib.rs
@@ -29,4 +29,5 @@ mod ptr;
 mod raw;
 mod result;
 mod slice;
+mod str;
 mod tuple;
diff --git a/src/libcoretest/str.rs b/src/libcoretest/str.rs
new file mode 100644
index 00000000000..bac8d509b13
--- /dev/null
+++ b/src/libcoretest/str.rs
@@ -0,0 +1,14 @@
+// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
+// file at the top-level directory of this distribution and at
+// http://rust-lang.org/COPYRIGHT.
+//
+// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
+// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
+// option. This file may not be copied, modified, or distributed
+// except according to those terms.
+
+#[test]
+fn strslice_issue_16589() {
+    assert!("bananas".contains("nana"));
+}