summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/tc-testing/creating-testcases/example.json
blob: 5ec501200970797a7a7a79a9718fc3a27bb915cc (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
[
    {
        "id": "1f",
        "name": "simple test to test framework",
        "category": [
            "example"
        ],
        "setup": [
            "mkdir mytest"
        ],
        "cmdUnderTest": "touch mytest/blorfl",
        "expExitCode": "0",
        "verifyCmd": "ls mytest/* | grep '[b]lorfl'",
        "matchPattern": "orfl",
        "matchCount": "1",
        "teardown": [
            "rm -rf mytest"
        ]
    },
    {
        "id": "2f",
        "name": "simple test, no need for verify",
        "category": [
            "example"
        ],
        "setup": [
            "mkdir mytest",
            "touch mytest/blorfl"
        ],
        "cmdUnderTest": "ls mytest/blorfl",
        "expExitCode": "0",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
            "rm -rf mytest"
        ]
    },
    {
        "id": "3f",
        "name": "simple test, no need for setup or teardown (or verify)",
        "category": [
            "example"
        ],
        "setup": [
        ],
        "cmdUnderTest": "ip l l lo",
        "expExitCode": "0",
        "verifyCmd": "/bin/true",
        "matchPattern": " ",
        "matchCount": "0",
        "teardown": [
        ]
    }
]