use xbasic::xbasic::XBasic; mod common; #[test] fn runtime_line_count() { let tio = common::TestIO::new("hello world\n"); let mut xb = XBasic::new(tio); assert!(xb.run("print \"hello world\"\n\"what\" and 3\n").is_err()); assert!(xb.error_handler.had_runtime_error); assert_eq!( xb.error_handler.errors, ["[line 2] Error : Cannot cast string to boolean."] ); xb.get_io().check(); }