aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/oni-scheme.bats
blob: acfa53d38d95a50ed4f9eda3cecfa6e0870d5bfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bats

@test "Opening a scheme file loads oni-scheme" {
    run emacs -batch -l package -f package-initialize \
          -visit test.scm \
          -eval "(prin1 (featurep 'oni-scheme))"

    [ "$output" = "t" ]
}

@test "Opening a file with the SCSH interpreter loads scheme-mode" {
    filename="$(mktemp)"

    echo "#!/usr/bin/scsh -s" > "$filename"

    run emacs -batch -l package -f package-initialize \
        -visit "$filename" \
        -eval "(prin1 major-mode)"

    rm "$filename"

    [ "$output" = "scheme-mode" ]
}