2023-08-22 18:26:49 +00:00
|
|
|
use std::fs::read_to_string;
|
|
|
|
|
2023-08-24 00:21:29 +00:00
|
|
|
use dust_lib::*;
|
2023-08-22 18:26:49 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn collections() {
|
|
|
|
let file_contents = read_to_string("tests/collections.ds").unwrap();
|
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
2023-08-23 02:20:42 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn list() {
|
|
|
|
let file_contents = read_to_string("tests/list.ds").unwrap();
|
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn table() {
|
|
|
|
let file_contents = read_to_string("tests/table.ds").unwrap();
|
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn variables() {
|
|
|
|
let file_contents = read_to_string("tests/variables.ds").unwrap();
|
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn scope() {
|
|
|
|
let file_contents = read_to_string("tests/scope.ds").unwrap();
|
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|