OxL Reference

tests/notes_test.oxl

oxl
use super.notes { add, pending, finish }
use std.orm { Db }

test "finished notes leave the open list" {
  let db = Db.open("sqlite::memory:")!
  let a = add(&db, "one")
  add(&db, "two")
  assert_eq(pending(&db), ["one", "two"])
  assert finish(&db, a)
  assert_eq(pending(&db), ["two"])
  assert !finish(&db, 99)
}

Source: examples/notes-orm/tests/notes_test.oxl