xbasic 0.3.1

A library that allows adding a scripting language onto your project with ease. This lets your users write their own arbitrary logic.
Documentation
mod common;

#[test]
fn basic_literal() {
	common::test_program(
		r#"print "test"
	"#,
		"test\n",
	);
}

#[test]
fn escaped_quote() {
	common::test_program(
		r#"
	print "hello \" world"
	"#,
		r#"hello " world
"#,
	)
}

#[test]
fn escaped_newline() {
	common::test_program(
		r#"
		print "hello \n world"
		"#,
		r#"hello 
 world
"#,
	)
}

#[test]
fn escaped_backslash() {
	common::test_program(
		r#"
	print "hello \\n world"
	"#,
		r#"hello \n world
"#,
	);

	common::test_program(
		r#"
	print "hello \\\ world"
	"#,
		r#"hello \\ world
"#,
	);
}

#[test]
fn unescaped_backslash() {
	common::test_program(
		r#"
	print "hello \ world"
	"#,
		r#"hello \ world
"#,
	);
}