python test print quote
@@ -242,6 +242,10 @@ mod test_python3_original {
use super::*;
#[test]
+ fn run_all() {
+ simple_print();
+ print_quote();
+ }
fn simple_print() {
let mut data = DataHolder::new();
data.current_bloc = String::from("print(\"lol\",1);");
@@ -252,4 +256,14 @@ mod test_python3_original {
let string_result = res.unwrap();
assert_eq!(string_result, "lol 1\n");
}
+ fn print_quote(){
+ let mut data = DataHolder::new();
+ data.current_bloc = String::from("print(\"->\\\"\",1);");
+ let mut interpreter = Python3_original::new(data);
+ let res = interpreter.run();
+
+ // should panic if not an Ok()
+ let string_result = res.unwrap();
+ assert_eq!(string_result, "->\" 1\n");
+ }
}
