1
0
dust/tests/dust_examples.rs

46 lines
859 B
Rust
Raw Normal View History

2023-08-22 18:26:49 +00:00
use std::fs::read_to_string;
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();
}
#[test]
fn data_formats() {
2023-09-12 15:58:57 +00:00
let file_contents = read_to_string("examples/data_formats.ds").unwrap();
eval(&file_contents).unwrap();
}