xbasic 0.1.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 add() {
	common::test_program("print 3 + 4\n", "7\n");
}

#[test]
fn sub() {
	common::test_program("print 3 - 4\n", "-1\n");
}

#[test]
fn mul2() {
	common::test_program("print 3 * true\n", "3\n");
}

#[test]
fn mul3() {
	common::test_program("print 3 * false\n", "0\n");
}

#[test]
fn mul4() {
	common::test_program("print 3 * 1.5\n", "4.5\n");
}

#[test]
fn mul() {
	common::test_program("print 3 * 4\n", "12\n");
}

#[test]
fn div() {
	common::test_program("print 3 / 4\n", "0.75\n");
}

#[test]
fn pow() {
	common::test_program("print 3^4\n", "81\n");
	common::test_program("print 3^-4\n", "0.012345679012345678\n");
	common::test_program("print 3i^-4i\n", "0.012345679012345678\n");
	common::test_program("print 2^2^2^2\n", "65536\n");
}