mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-26 22:06:26 +00:00
This function was used in both
This commit is contained in:
parent
62b85e3e93
commit
c18302e46e
@ -187,16 +187,17 @@ fn split_on_equals(input: &OsStr) -> Option<(&OsStr, &OsStr)> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// Creates an `OSString` (used in tests)
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod split_test {
|
fn os(input: &'static str) -> OsString {
|
||||||
use super::split_on_equals;
|
|
||||||
use std::ffi::OsString;
|
|
||||||
|
|
||||||
fn os(input: &'static str) -> OsString {
|
|
||||||
let mut os = OsString::new();
|
let mut os = OsString::new();
|
||||||
os.push(input);
|
os.push(input);
|
||||||
os
|
os
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod split_test {
|
||||||
|
use super::{split_on_equals, os};
|
||||||
|
|
||||||
macro_rules! test_split {
|
macro_rules! test_split {
|
||||||
($name:ident: $input:expr => None) => {
|
($name:ident: $input:expr => None) => {
|
||||||
@ -239,12 +240,6 @@ mod test {
|
|||||||
Arg { short: Some(b'c'), long: "count", takes_value: TakesValue::Necessary }
|
Arg { short: Some(b'c'), long: "count", takes_value: TakesValue::Necessary }
|
||||||
];
|
];
|
||||||
|
|
||||||
fn os(input: &'static str) -> OsString {
|
|
||||||
let mut os = OsString::new();
|
|
||||||
os.push(input);
|
|
||||||
os
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn empty() {
|
fn empty() {
|
||||||
let bits = [ ];
|
let bits = [ ];
|
||||||
|
Loading…
Reference in New Issue
Block a user