elementary shell behavior: can kick off a foreground process and
handle signals
This commit is contained in:
parent
3b1ae0efd5
commit
99cb9e5a2e
17 changed files with 619 additions and 167 deletions
|
|
@ -9,7 +9,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -25,7 +25,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -41,7 +41,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -57,7 +57,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -73,7 +73,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -89,7 +89,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -105,7 +105,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -121,7 +121,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -137,7 +137,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -153,7 +153,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -169,7 +169,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -185,7 +185,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -201,7 +201,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -220,7 +220,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
let _ = *eval(&lex(&document.to_string()).unwrap(), &mut syms).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&check1.to_string()).unwrap(), &mut syms)
|
||||
|
|
@ -244,7 +244,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
let _ = *eval(&lex(&document.to_string()).unwrap(), &mut syms).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&check1.to_string()).unwrap(), &mut syms)
|
||||
|
|
@ -261,7 +261,7 @@ mod math_lib_tests {
|
|||
let result1 = "3";
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
let _ = *eval(&lex(&document.to_string()).unwrap(), &mut syms).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&check1.to_string()).unwrap(), &mut syms)
|
||||
|
|
@ -279,7 +279,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
let _ = *eval(&lex(&document.to_string()).unwrap(), &mut syms).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&check1.to_string()).unwrap(), &mut syms)
|
||||
|
|
@ -296,7 +296,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -312,7 +312,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -328,7 +328,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -344,7 +344,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -360,7 +360,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -376,7 +376,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -392,7 +392,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -408,7 +408,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -424,7 +424,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -440,7 +440,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -456,7 +456,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -472,7 +472,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -488,7 +488,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -504,7 +504,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -520,7 +520,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -536,7 +536,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -552,7 +552,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -568,7 +568,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -584,7 +584,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -600,7 +600,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
assert_eq!(
|
||||
*eval(&lex(&document.to_string()).unwrap(), &mut syms)
|
||||
.unwrap()
|
||||
|
|
@ -617,7 +617,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
|
||||
let doc_tree = lex(&document.to_string()).unwrap();
|
||||
let change_tree = lex(&change.to_string()).unwrap();
|
||||
|
|
@ -656,7 +656,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
|
||||
let doc_tree = lex(&document.to_string()).unwrap();
|
||||
let change_tree = lex(&change.to_string()).unwrap();
|
||||
|
|
@ -689,7 +689,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
|
||||
let doc_tree = lex(&document.to_string()).unwrap();
|
||||
let change_tree = lex(&change.to_string()).unwrap();
|
||||
|
|
@ -720,7 +720,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
|
||||
let doc_tree = lex(&document.to_string()).unwrap();
|
||||
let change_tree = lex(&change.to_string()).unwrap();
|
||||
|
|
@ -759,7 +759,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
|
||||
let doc_tree = lex(&document.to_string()).unwrap();
|
||||
let change_tree = lex(&change.to_string()).unwrap();
|
||||
|
|
@ -792,7 +792,7 @@ mod math_lib_tests {
|
|||
|
||||
let mut syms = SymTable::new();
|
||||
static_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms).unwrap();
|
||||
dynamic_stdlib(&mut syms, None).unwrap();
|
||||
|
||||
let doc_tree = lex(&document.to_string()).unwrap();
|
||||
let change_tree = lex(&change.to_string()).unwrap();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue