1
// Skipped under Miri: these tests compile+run wasm via wasmtime, whose
2
// Cranelift backend refuses to run under Miri.
3
#![cfg(not(miri))]
4

            
5
//! PERSIST rows: a global a SHOULD-APPLY of an earlier unit stores to stays a
6
//! cell in every later unit, which compiles that SHOULD-APPLY again.
7

            
8
#[path = "persist/rows.rs"]
9
mod persist;
10

            
11
use persist::{Row, assert_pinned, row};
12

            
13
1
fn rows() -> Vec<Row> {
14
1
    vec![row(
15
1
        "V3a",
16
1
        &[
17
1
            "(defvar *m* 5)",
18
1
            "(defvar *seen* 0)",
19
1
            "(defun should-apply () (setf *seen* *m*) t)",
20
1
            "*seen*",
21
1
            "(+ 1 2)",
22
1
            "*seen*",
23
1
        ],
24
1
    )]
25
1
}
26

            
27
const CL: &[(&str, &[&str])] = &[("V3a", &["-", "-", "-", "5", "3", "5"])];
28

            
29
#[test]
30
1
fn every_row_reads_as_common_lisp() {
31
1
    assert_pinned(&rows(), CL);
32
1
}