1
0

Clean up tests and docs

This commit is contained in:
Jeff 2023-10-25 16:41:51 -04:00
parent 51e93e5992
commit 3e45c198aa
3 changed files with 6 additions and 5 deletions

View File

@ -49,7 +49,7 @@ Dust is an experimental project under active development. At this stage, feature
To get help with the shell you can use the "help" tool.
```dust
(help) # Returns a table with tool info.
(help) # Returns a table with tool info.
```
## Installation

View File

@ -16,8 +16,8 @@ use crate::{abstract_tree::item::Item, language, AbstractTree, Result, Value, Va
/// # Examples
///
/// ```rust
/// # use dust::*;
/// assert_eq!(evaluate("1 + 2 + 3"), vec![Ok(Value::Integer(6))]);
/// # use dust_lang::*;
/// assert_eq!(evaluate("1 + 2 + 3"), Ok(Value::Integer(6)));
/// ```
pub fn evaluate(source: &str) -> Result<Value> {
let mut context = VariableMap::new();
@ -30,7 +30,7 @@ pub fn evaluate(source: &str) -> Result<Value> {
/// # Examples
///
/// ```rust
/// # use dust::*;
/// # use dust_lang::*;
/// let mut context = VariableMap::new();
///
/// context.set_value("one".into(), 1.into());
@ -41,7 +41,7 @@ pub fn evaluate(source: &str) -> Result<Value> {
///
/// assert_eq!(
/// evaluate_with_context(dust_code, &mut context),
/// vec![Ok(Value::Empty), Ok(Value::Integer(10))]
/// Ok(Value::Integer(10))
/// );
/// ```
pub fn evaluate_with_context(source: &str, context: &mut VariableMap) -> Result<Value> {

View File

@ -10,6 +10,7 @@ fn clue_solver() {
}
#[test]
#[ignore]
fn fetch() {
let file_contents = read_to_string("examples/fetch.ds").unwrap();