Skip to content

Commit

Permalink
Enhancement: Support script runner args for rust scripts #987
Browse files Browse the repository at this point in the history
  • Loading branch information
sagiegurari committed Jan 20, 2024
1 parent ffa3963 commit 80e5a2d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/lib/scriptengine/rsscript_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ fn execute_default_valid() {

let valid = execute(
&vec!["fn main() {println!(\"test\");}".to_string()],
None,
&vec![],
true,
);
Expand All @@ -74,6 +75,7 @@ fn execute_default_not_compile() {

execute(
&vec!["fn main() {donotcompile();}".to_string()],
None,
&vec![],
true,
);
Expand All @@ -91,6 +93,7 @@ fn execute_default_runtime_panic() {

execute(
&vec!["fn main() {panic!(\"error\");}".to_string()],
None,
&vec![],
true,
);
Expand All @@ -107,6 +110,7 @@ fn execute_default_runtime_panic_no_validate() {

let valid = execute(
&vec!["fn main() {panic!(\"error\");}".to_string()],
None,
&vec![],
false,
);
Expand All @@ -124,6 +128,7 @@ fn execute_rust_script_valid() {

let valid = execute(
&vec!["fn main() {println!(\"test\");}".to_string()],
None,
&vec![],
true,
);
Expand All @@ -142,6 +147,7 @@ fn execute_rust_script_not_compile() {

execute(
&vec!["fn main() {donotcompile();}".to_string()],
None,
&vec![],
true,
);
Expand All @@ -159,6 +165,7 @@ fn execute_rust_script_runtime_panic() {

execute(
&vec!["fn main() {panic!(\"error\");}".to_string()],
None,
&vec![],
true,
);
Expand All @@ -175,6 +182,7 @@ fn execute_rust_script_runtime_panic_no_validate() {

let valid = execute(
&vec!["fn main() {panic!(\"error\");}".to_string()],
None,
&vec![],
false,
);
Expand All @@ -193,6 +201,7 @@ fn execute_cargo_play_not_compile() {

execute(
&vec!["fn main() {donotcompile();}".to_string()],
None,
&vec![],
true,
);
Expand All @@ -210,6 +219,7 @@ fn execute_cargo_play_runtime_panic() {

execute(
&vec!["fn main() {panic!(\"error\");}".to_string()],
None,
&vec![],
true,
);
Expand All @@ -226,6 +236,7 @@ fn execute_cargo_play_runtime_panic_no_validate() {

let valid = execute(
&vec!["fn main() {panic!(\"error\");}".to_string()],
None,
&vec![],
false,
);
Expand Down

0 comments on commit 80e5a2d

Please sign in to comment.