summaryrefslogtreecommitdiff
path: root/test/script/list.et
blob: cfd4803ac74c7973035d59d317da9e7f5063f6c1 (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
module list

asset scripts:
    path: ../asset/list

def expect_next_stdout (what) from p:
    expect /child-stdout shell (.*)/ from p capture line
    guard (line == what)


test ListConcat:
    spawn as p 
    with p:
        send "load ${scripts.path}/concat.et"
        expect /load-done/

        send "run Test"
        expect_next_stdout from p:
            "c1 1"
            "c1-end"
            "c2 1"
            "c2-end"
            "c3 1"
            "c3 2"
            "c3 3"
            "c3 6"
            "c3 5"
            "c3 2"
            "c3 3"
            "c3-end"
            "c4 1"
            "c4 2"
            "c4 3"
            "c4 6"
            "c4 5"
            "c4 2"
            "c4 3"
            "c4-end"
        local:
            expect /(run-.*)/ capture done
            guard (done == "run-done")