aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorOnur Gündüz <ogunduz@gmail.com>2026-09-29 16:54:27 +0200
committerOnur Gündüz <ogunduz@gmail.com>2026-09-29 16:54:27 +0200
commit5a738121c04989e1bdcb728347f12e677adf3bd4 (patch)
treee47c1e732bacac41b5b1ace02a39687a58567c34 /tests
parent5c51cd28a928c44232e625279691da17e55858de (diff)
downloadele-5a738121c04989e1bdcb728347f12e677adf3bd4.tar.gz
ele-5a738121c04989e1bdcb728347f12e677adf3bd4.zip
Rename crate and CLI to aif
Diffstat (limited to 'tests')
-rw-r--r--tests/cli_tests.rs20
-rw-r--r--tests/compiled_tests.rs10
-rw-r--r--tests/eval_tests.rs2
-rw-r--r--tests/has_path_tests.rs2
-rw-r--r--tests/json_number_tests.rs2
-rw-r--r--tests/limit_tests.rs4
-rw-r--r--tests/parse_tests.rs2
7 files changed, 21 insertions, 21 deletions
diff --git a/tests/cli_tests.rs b/tests/cli_tests.rs
index c195c5c..76c9078 100644
--- a/tests/cli_tests.rs
+++ b/tests/cli_tests.rs
@@ -6,7 +6,7 @@ fn run(expr: &str, input: &str, args: &[&str]) -> Output {
}
fn run_bytes(expr: &str, input: &[u8], args: &[&str]) -> Output {
- let mut child = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let mut child = Command::new(env!("CARGO_BIN_EXE_aif"))
.args(args)
.arg(expr)
.stdin(Stdio::piped())
@@ -144,7 +144,7 @@ fn empty_filter_and_print_mode() {
assert!(output.stdout.is_empty());
let path = format!("{}/README.md", env!("CARGO_MANIFEST_DIR"));
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.args(["", &path])
.stdin(Stdio::null())
.output()
@@ -156,7 +156,7 @@ fn empty_filter_and_print_mode() {
#[test]
fn information_flags_succeed_and_unknown_long_options_fail() {
for flag in ["--help", "-h", "--version", "-V"] {
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.arg(flag)
.stdin(Stdio::null())
.output()
@@ -169,11 +169,11 @@ fn information_flags_succeed_and_unknown_long_options_fail() {
assert!(text.contains("--max-record-bytes"));
assert!(text.contains("--version"));
} else {
- assert_eq!(text, format!("aip-filter {}\n", env!("CARGO_PKG_VERSION")));
+ assert_eq!(text, format!("aif {}\n", env!("CARGO_PKG_VERSION")));
}
}
for flag in ["--verison", "--unknown", "--print=invalid"] {
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.arg(flag)
.stdin(Stdio::null())
.output()
@@ -267,7 +267,7 @@ fn filtering_multiple_files_preserves_successful_output() {
let second = dir.join("second.jsonl");
std::fs::write(&first, b"\"match first\"\n").unwrap();
std::fs::write(&second, b"invalid\n\"match second\"\n").unwrap();
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.arg("match")
.arg(&first)
.arg(&second)
@@ -292,7 +292,7 @@ fn multiple_files_keep_record_boundaries_without_forcing_a_final_newline() {
for ending in ["", "\n", "\r\n"] {
std::fs::write(&first, format!("\"match first\"{ending}")).unwrap();
std::fs::write(&last, b"\"match last\"").unwrap();
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.arg("match")
.args([&first, &middle, &last])
.output()
@@ -311,7 +311,7 @@ fn multiple_files_keep_record_boundaries_without_forcing_a_final_newline() {
}
std::fs::write(&first, b"raw").unwrap();
std::fs::write(&last, b"bytes").unwrap();
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.arg("")
.args([&first, &last])
.output()
@@ -328,7 +328,7 @@ fn output_flush_errors_are_reported() {
use std::os::unix::net::UnixStream;
let (writer, reader) = UnixStream::pair().unwrap();
drop(reader);
- let mut child = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let mut child = Command::new(env!("CARGO_BIN_EXE_aif"))
.arg("foobar")
.stdin(Stdio::piped())
.stdout(Stdio::from(OwnedFd::from(writer)))
@@ -345,7 +345,7 @@ fn output_flush_errors_are_reported() {
for flag in ["--help", "--version"] {
let (writer, reader) = UnixStream::pair().unwrap();
drop(reader);
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.arg(flag)
.stdin(Stdio::null())
.stdout(Stdio::from(OwnedFd::from(writer)))
diff --git a/tests/compiled_tests.rs b/tests/compiled_tests.rs
index b90c810..56059c5 100644
--- a/tests/compiled_tests.rs
+++ b/tests/compiled_tests.rs
@@ -1,4 +1,4 @@
-use aip_filter::{Expr, Filterable, Value, parse};
+use aif::{Expr, Filterable, Value, parse};
use serde_json::json;
use std::process::{Command, Stdio};
@@ -21,7 +21,7 @@ fn unsupported_functions_reject_the_entire_filter() {
.contains("function calls are not supported")
);
assert!(!expr.evaluate(&record), "{input}");
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.arg(input)
.stdin(Stdio::null())
.output()
@@ -32,7 +32,7 @@ fn unsupported_functions_reject_the_entire_filter() {
String::from_utf8_lossy(&output.stderr).contains("function calls are not supported")
);
}
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.args(["--print", "fn(x)"])
.output()
.unwrap();
@@ -131,9 +131,9 @@ fn regex_resources_and_manual_trees_are_bounded() {
let mut expr = parse("value").unwrap().unwrap();
for _ in 0..150 {
expr = Expr::Unary {
- op: aip_filter::UnaryOp::Not,
+ op: aif::UnaryOp::Not,
expr: Box::new(expr),
- pos: aip_filter::Position { line: 1, col: 1 },
+ pos: aif::Position { line: 1, col: 1 },
};
}
assert!(expr.compile().unwrap_err().contains("expression limit"));
diff --git a/tests/eval_tests.rs b/tests/eval_tests.rs
index 885b497..ae3edec 100644
--- a/tests/eval_tests.rs
+++ b/tests/eval_tests.rs
@@ -1,4 +1,4 @@
-use aip_filter::{Filterable, Value, parse};
+use aif::{Filterable, Value, parse};
struct Record<'a> {
value: Value<'a>,
diff --git a/tests/has_path_tests.rs b/tests/has_path_tests.rs
index 459eaba..281a8e6 100644
--- a/tests/has_path_tests.rs
+++ b/tests/has_path_tests.rs
@@ -1,4 +1,4 @@
-use aip_filter::{Filterable, Value, parse};
+use aif::{Filterable, Value, parse};
use serde_json::json;
fn matches(record: &impl Filterable, text: &str) -> bool {
diff --git a/tests/json_number_tests.rs b/tests/json_number_tests.rs
index 97f63ca..0a0662d 100644
--- a/tests/json_number_tests.rs
+++ b/tests/json_number_tests.rs
@@ -1,4 +1,4 @@
-use aip_filter::{Filterable, Value, parse};
+use aif::{Filterable, Value, parse};
use serde_json::{Number, Value as Json};
#[test]
diff --git a/tests/limit_tests.rs b/tests/limit_tests.rs
index 31748fc..a54463b 100644
--- a/tests/limit_tests.rs
+++ b/tests/limit_tests.rs
@@ -1,4 +1,4 @@
-use aip_filter::parse;
+use aif::parse;
use std::process::Command;
#[test]
@@ -14,7 +14,7 @@ fn excessive_filters_report_errors_without_crashing() {
"x".repeat(65537),
];
for filter in filters {
- let output = Command::new(env!("CARGO_BIN_EXE_aip-filter"))
+ let output = Command::new(env!("CARGO_BIN_EXE_aif"))
.args(["--print", &filter])
.output()
.unwrap();
diff --git a/tests/parse_tests.rs b/tests/parse_tests.rs
index 67398b5..40a3879 100644
--- a/tests/parse_tests.rs
+++ b/tests/parse_tests.rs
@@ -1,4 +1,4 @@
-use aip_filter::parse;
+use aif::parse;
use std::collections::HashSet;
use std::fs;
use std::path::Path;