Skip to content

Commit f1d5566

Browse files
committed
Show that make_providers is used by multiple tests
1 parent b1610ce commit f1d5566

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/uu/sed/src/delimited_parser.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fn parse_char_escape(line: &mut ScriptCharProvider) -> Option<char> {
195195
/// This functionality is needed to avoid terminating delimited
196196
/// sequences when a delimiter appears within a character class.
197197
/// While at it, handle escaped characters for the sake of consistency.
198-
pub fn parse_character_class(
198+
fn parse_character_class(
199199
lines: &ScriptLineProvider,
200200
line: &mut ScriptCharProvider,
201201
) -> UResult<String> {
@@ -415,6 +415,12 @@ pub fn parse_transliteration(
415415
mod tests {
416416
use super::*;
417417

418+
fn make_providers(input: &str) -> (ScriptLineProvider, ScriptCharProvider) {
419+
let lines = ScriptLineProvider::new(vec![]); // Empty for tests
420+
let line = ScriptCharProvider::new(input);
421+
(lines, line)
422+
}
423+
418424
// parse_numeric_escape
419425
#[test]
420426
fn test_compile_octal_escape() {
@@ -764,12 +770,6 @@ mod tests {
764770
}
765771

766772
// parse_regex
767-
fn make_providers(input: &str) -> (ScriptLineProvider, ScriptCharProvider) {
768-
let lines = ScriptLineProvider::new(vec![]); // Empty for tests
769-
let line = ScriptCharProvider::new(input);
770-
(lines, line)
771-
}
772-
773773
#[test]
774774
fn test_simple_regex() {
775775
let (lines, mut line) = make_providers("/abc/");

0 commit comments

Comments
 (0)