aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/util/lib.rs1
-rw-r--r--tests/unit/util/str.rs12
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/unit/util/lib.rs b/tests/unit/util/lib.rs
index ab972bf7017..1418618f0b4 100644
--- a/tests/unit/util/lib.rs
+++ b/tests/unit/util/lib.rs
@@ -13,3 +13,4 @@ extern crate euclid;
#[cfg(test)] mod task;
#[cfg(test)] mod vec;
#[cfg(test)] mod mem;
+#[cfg(test)] mod str;
diff --git a/tests/unit/util/str.rs b/tests/unit/util/str.rs
new file mode 100644
index 00000000000..63f8fbd8881
--- /dev/null
+++ b/tests/unit/util/str.rs
@@ -0,0 +1,12 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+use util::str::split_html_space_chars;
+
+
+#[test]
+pub fn split_html_space_chars_whitespace() {
+ assert!(split_html_space_chars("").collect::<Vec<_>>().is_empty());
+ assert!(split_html_space_chars("\u{0020}\u{0009}\u{000a}\u{000c}\u{000d}").collect::<Vec<_>>().is_empty());
+}