aboutsummaryrefslogtreecommitdiffstats
path: root/test/integration/oni-core.bats
blob: c7c6daea1dcafa2a08512c6a5cbe646084d2fa1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env bats

@test "Opening emacs loads oni-core" {
    run emacs -batch -l package -f package-initialize \
        -eval "(prin1 (featurep 'oni-core))"

    echo "$output"

    [[ "$output" == *"t" ]]
}

@test "C-a is bound to oni-core-move-to-beginning-of-dwim" {
    run emacs -batch -l package -f package-initialize \
        -eval "(prin1 (key-binding (kbd \"C-a\")))"

    echo "$output"

    [[ "$output" == *"oni-core-move-beginning-of-dwim" ]]
}

@test "C-e is bound to oni-core-move-to-end-of-dwim" {
    run emacs -batch -l package -f package-initialize \
        -eval "(prin1 (key-binding (kbd \"C-e\")))"

    echo "$output"

    [[ "$output" == *"oni-core-move-end-of-dwim" ]]
}

@test "Starting Emacs diminishes gcmh-mode" {
    run emacs -batch -l package -f package-initialize -l subr-x \
        -eval "(prin1 (string-empty-p (car (alist-get 'gcmh-mode minor-mode-alist))))"

    echo "$output"

    [[ "$output" == *"t" ]]
}

@test "Starting Emacs enables gcmh-mode" {
    run emacs -batch -l package -f package-initialize \
        -eval "(prin1 (bound-and-true-p gcmh-mode))"

    echo "$output"

    [[ "$output" == *"t" ]]
}

@test "Starting Emacs diminishes ws-butler-global-mode" {
    run emacs -batch -l package -f package-initialize -l subr-x \
        -eval "(prin1 (string-empty-p (car (alist-get 'ws-butler-mode minor-mode-alist))))"

    echo "$output"

    [[ "$output" == *"t" ]]
}

@test "Starting Emacs turns on ws-butler-mode" {
    run emacs -batch -l package -f package-initialize \
        -eval "(prin1 (bound-and-true-p ws-butler-mode))"

    echo "$output"

    [[ "$output" == *"t" ]]
}