MCPcopy Create free account
hub / github.com/amber-lang/amber / test_each_installed_postprocessor

Function test_each_installed_postprocessor

src/tests/postprocessor.rs:85–103  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

83
84#[test]
85fn test_each_installed_postprocessor() {
86 let hello = "echo \"Hello world!\"";
87 let hello = compile_code(hello);
88
89 let processors = PostProcessor::get_default();
90 for processor in processors {
91 if processor.is_available() {
92 let res = processor.execute(hello.clone());
93 assert!(
94 res.is_ok(),
95 "Postprocessor {} couldn't process hello world",
96 processor.name
97 );
98 let res = res.unwrap();
99 let (stdout, _) = eval_bash(res);
100 assert_eq!(stdout, "Hello world!");
101 }
102 }
103}

Callers

nothing calls this directly

Calls 4

compile_codeFunction · 0.85
eval_bashFunction · 0.85
is_availableMethod · 0.80
executeMethod · 0.45

Tested by

no test coverage detected