use super::RULE;
#[test]
fn test_ignore_split_row_without_first() {
let good = r#""a:b:c" | split row ":""#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_split_row_with_get() {
let good = r#""a:b:c" | split row ":" | get 1"#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_split_row_first_n() {
let good = r#""a:b:c" | split row ":" | first 2"#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_split_row_last() {
let good = r#""a:b:c" | split row ":" | last"#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_split_row_last_n() {
let good = r#""a:b:c" | split row ":" | last 2"#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_parse_usage() {
let good = r#""a:b:c" | parse "{first}:{rest}""#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_split_row_for_iteration() {
let good = r#""a,b,c" | split row "," | each {|x| $x | str upcase }"#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_split_words() {
let good = r#""hello world" | split words | first"#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_space_delimiter() {
let good = r#""hello world" | split row " " | first"#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_split_column() {
let good = r#""a:b:c" | split column ":" | first"#;
RULE.assert_ignores(good);
}
#[test]
fn test_ignore_split_chars() {
let good = r#""abc" | split chars | first"#;
RULE.assert_ignores(good);
}