From 0a6d9a27c55e154bde7a0ce716ddb84d6151eefc Mon Sep 17 00:00:00 2001 From: Schrottkatze Date: Sun, 19 Nov 2023 16:53:19 +0100 Subject: [PATCH] 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 --- src/syntax/check/test.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/syntax/check/test.rs b/src/syntax/check/test.rs index 44a3523..d798be3 100644 --- a/src/syntax/check/test.rs +++ b/src/syntax/check/test.rs @@ -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] fn test_check_literal_with_args() { let test_data = "14 12 | sink";