write test against regression of syntax check_literal_as_filter

check_literal_as_filter returned literals at the end of pipelines too, which isn't
desirable since that's the job of check_literal_as_sink
This commit is contained in:
Schrottkatze 2023-11-19 16:53:19 +01:00
parent 17878b3e87
commit 0a6d9a27c5

View file

@ -49,6 +49,14 @@ fn test_check_literal_as_filter() {
) )
} }
#[test]
fn test_check_literal_as_filter_positive_on_sink() {
let test_data = "meow | 42";
let syntax = parse_syntax(test_data).unwrap();
assert_eq!(check_literal_as_filter(&syntax), Ok(()))
}
#[test] #[test]
fn test_check_literal_with_args() { fn test_check_literal_with_args() {
let test_data = "14 12 | sink"; let test_data = "14 12 | sink";