harn-vm 0.10.29

Async bytecode virtual machine for the Harn programming language
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use super::tests_runtime::run_harn;

#[test]
fn calling_returned_closures() {
    let (output, _) = run_harn(
        r"pipeline t(task) {
  fn make(base) { return { value -> base + value } }
  log(make(40)(2))
  log((make(39))(3))
  log(41 |> make(1)(_))
}",
    );
    assert_eq!(output, "[harn] 42\n[harn] 42\n[harn] 42\n");
}