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() {
|
2023-09-12 15:58:57 +00:00
|
|
|
let file_contents = read_to_string("examples/collections.ds").unwrap();
|
2023-08-22 18:26:49 +00:00
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
2023-08-23 02:20:42 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn list() {
|
2023-09-12 15:58:57 +00:00
|
|
|
let file_contents = read_to_string("examples/list.ds").unwrap();
|
2023-08-23 02:20:42 +00:00
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn table() {
|
2023-09-12 15:58:57 +00:00
|
|
|
let file_contents = read_to_string("examples/table.ds").unwrap();
|
2023-08-23 02:20:42 +00:00
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn variables() {
|
2023-09-12 15:58:57 +00:00
|
|
|
let file_contents = read_to_string("examples/variables.ds").unwrap();
|
2023-08-23 02:20:42 +00:00
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn scope() {
|
2023-09-12 15:58:57 +00:00
|
|
|
let file_contents = read_to_string("examples/scope.ds").unwrap();
|
2023-08-23 02:20:42 +00:00
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|
2023-09-08 09:59:44 +00:00
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn data_formats() {
|
2023-09-12 15:58:57 +00:00
|
|
|
let file_contents = read_to_string("examples/data_formats.ds").unwrap();
|
2023-09-08 09:59:44 +00:00
|
|
|
|
|
|
|
eval(&file_contents).unwrap();
|
|
|
|
}
|