2023-10-06 12:17:37 +00:00
|
|
|
use std::fs::read_to_string;
|
|
|
|
|
|
|
|
use dust::*;
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn collections() {
|
|
|
|
let file_contents = read_to_string("examples/collections.ds").unwrap();
|
|
|
|
|
2023-10-09 19:54:47 +00:00
|
|
|
evaluate(&file_contents).unwrap();
|
2023-10-06 12:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn list() {
|
|
|
|
let file_contents = read_to_string("examples/list.ds").unwrap();
|
|
|
|
|
2023-10-09 19:54:47 +00:00
|
|
|
evaluate(&file_contents).unwrap();
|
2023-10-06 12:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn table() {
|
|
|
|
let file_contents = read_to_string("examples/table.ds").unwrap();
|
|
|
|
|
2023-10-09 19:54:47 +00:00
|
|
|
evaluate(&file_contents).unwrap();
|
2023-10-06 12:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn variables() {
|
|
|
|
let file_contents = read_to_string("examples/variables.ds").unwrap();
|
|
|
|
|
2023-10-09 19:54:47 +00:00
|
|
|
evaluate(&file_contents).unwrap();
|
2023-10-06 12:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn scope() {
|
|
|
|
let file_contents = read_to_string("examples/scope.ds").unwrap();
|
|
|
|
|
2023-10-09 19:54:47 +00:00
|
|
|
evaluate(&file_contents).unwrap();
|
2023-10-06 12:17:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
fn data_formats() {
|
|
|
|
let file_contents = read_to_string("examples/data_formats.ds").unwrap();
|
|
|
|
|
2023-10-09 19:54:47 +00:00
|
|
|
evaluate(&file_contents).unwrap();
|
2023-10-06 12:17:37 +00:00
|
|
|
}
|