summaryrefslogtreecommitdiffstats
path: root/tests/ts/libmount/optlist
blob: 84994967f8973c4da128d823ffcc3766ad57094e (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
65
66
67
#!/bin/bash

# Copyright (C) 2010 Karel Zak <kzak@redhat.com>

TS_TOPDIR="${0%/*}/../.."
TS_DESC="options string"

. "$TS_TOPDIR"/functions.sh
ts_init "$*"

ts_check_test_command $TS_HELPER_LIBMOUNT_OPTLIST

TESTPROG="$TS_HELPER_LIBMOUNT_OPTLIST"

ts_init_subtest "append"
ts_run $TESTPROG --append-str "aaa,bbb=BBB,context=\"foo,bar,gogo\",ccc" "ddd" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "append-value"
ts_run $TESTPROG --append-str "aaa,bbb=BBB,ccc" "ddd=DDD" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "append-empty-value"
ts_run $TESTPROG --append-str "aaa,bbb=BBB,ccc" "ddd=" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "prepend"
ts_run $TESTPROG --prepend-str "aaa,bbb=BBB,ccc" "ddd" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "prepend-list"
ts_run $TESTPROG --prepend-str "aaa,bbb=BBB,ccc" "ddd,eee=EEE,fff" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "prepend-value"
ts_run $TESTPROG --prepend-str "aaa,bbb=BBB,ccc" "ddd=DDD" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "prepend-empty-value"
ts_run $TESTPROG --prepend-str "aaa,bbb=BBB,ccc" "ddd=" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "set"
ts_run $TESTPROG --set-str "aaa,bbb=BBB,ccc" "new,data,for,list" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "get-str"
ts_run $TESTPROG --get-str "aaa,bbb=BBB,ccc,defaults" &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "get-str-linux"
ts_run $TESTPROG --get-str "noexec,noauto,user,defaults" linux &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "get-str-user"
ts_run $TESTPROG --get-str "noexec,noauto,user,defaults" user &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "get-flg-linux"
ts_run $TESTPROG --get-flg "noexec,noauto,user,defaults" linux &> $TS_OUTPUT
ts_finalize_subtest

ts_init_subtest "get-flg-user"
ts_run $TESTPROG --get-flg "noexec,noauto,user,defaults" user &> $TS_OUTPUT
ts_finalize_subtest

ts_finalize