riji 0.1.16

Scripting environment using rhai
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use std::process::Command;

#[test]
fn test_help() {
	let output = Command::new("./target/debug/riji")
		.env("RIJI_SCRIPT", "tests/test_help.rhai")
		.arg("help")
		.output()
		.expect("Failed to execute command");

	assert!(output.status.success());

	let stdout = String::from_utf8(output.stdout).unwrap();
	let stderr = String::from_utf8(output.stderr).unwrap();

	assert_eq!(stdout, "test help\n- help\n- test1\n");
	assert_eq!(stderr, "");
}