annotate tests/chmod.test @ 1499:319e79bab052 draft

Separate more commands so single.sh can build them standalone.
author Rob Landley <rob@landley.net>
date Fri, 26 Sep 2014 18:42:23 -0500
parents 8700cbe1cb29
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
1 #!/bin/bash
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
2
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
3 # Copyright 2013 Divya Kothari <divya.s.kothari@gmail.com>
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
4 # Copyright 2013 Robin Mittal <robinmittal.it@gmail.com>
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
5
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
6 #testing "name" "command" "result" "infile" "stdin"
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
7
1378
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
8 PERM="---""--x""-w-""-wx""r--""r-x""rw-""rwx"
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
9
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
10 num2perm()
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
11 {
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
12 for i in 0 1 2
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
13 do
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
14 num=${1:$i:1}
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
15 printf "%s" ${PERM:$(($num*3)):3}
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
16 done
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
17 echo
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
18 }
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
19
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
20 # Creating test files to test chmod command
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
21 mkdir dir
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
22 touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
23
1378
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
24 # We don't need to test all 511 permissions
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
25 for u in 0 1 2 3 4 5 6 7
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
26 do
1378
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
27 for g in 0 3 6
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
28 do
1378
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
29 for o in 0 7
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
30 do
1378
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
31 if [ "$type" == file ]
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
32 then
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
33 type=dir
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
34 rm -rf "./$type" && mkdir $type
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
35 DASH=d
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
36 else
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
37 type=file
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
38 rm -f "./$type" && touch $type
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
39 DASH=-
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
40 fi
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
41 DASHES=$(num2perm $u$g$o)
6c54196fce62 Cut down from 1000+ file attribute tests to a more manageable number.
Rob Landley <rob@landley.net>
parents: 1377
diff changeset
42 testing "chmod $u$g$o $type" "chmod $u$g$o $type &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
43 ls -ld $type | cut -d' ' -f 1 | cut -d. -f 1" "$DASH$DASHES\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
44 done
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
45 done
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
46 done
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
47
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
48 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
49 testing "chmod 750 dir 640 file" \
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
50 "chmod 750 dir 640 file 2>/dev/null ||
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
51 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-x---\n-rwxr-x---\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
52
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
53 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
54 testing "chmod 666 dir file" \
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
55 "chmod 666 dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
56 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drw-rw-rw-\n-rw-rw-rw-\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
57
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
58 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
59 testing "chmod 765 *" "chmod 765 * &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
60 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxrw-r-x\n-rwxrw-r-x\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
61
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
62 ##### u,g,o,a=r,w,x
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
63 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
64 testing "chmod u=r dir file" "chmod u=r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
65 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "dr--r-xr-x\n-r--r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
66
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
67 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
68 testing "chmod u=w dir file" "chmod u=w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
69 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d-w-r-xr-x\n--w-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
70
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
71 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
72 testing "chmod u=x dir file" "chmod u=x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
73 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d--xr-xr-x\n---xr--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
74
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
75 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
76 testing "chmod u+r dir file" "chmod u+r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
77 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
78
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
79 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
80 testing "chmod u+w dir file" "chmod u+w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
81 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
82
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
83 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
84 testing "chmod u+x dir file" "chmod u+x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
85 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rwxr--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
86
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
87 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
88 testing "chmod u-r dir file" "chmod u-r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
89 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d-wxr-xr-x\n--w-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
90
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
91 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
92 testing "chmod u-w dir file" "chmod u-w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
93 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "dr-xr-xr-x\n-r--r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
94
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
95 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
96 testing "chmod u-x dir file" "chmod u-x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
97 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drw-r-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
98
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
99 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
100 testing "chmod g=r dir file" "chmod g=r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
101 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr--r-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
102
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
103 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
104 testing "chmod g=w dir file" "chmod g=w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
105 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwx-w-r-x\n-rw--w-r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
106
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
107 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
108 testing "chmod g=x dir file" "chmod g=x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
109 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwx--xr-x\n-rw---xr--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
110
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
111 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
112 testing "chmod g+r dir file" "chmod g+r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
113 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
114
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
115 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
116 testing "chmod g+w dir file" "chmod g+w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
117 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxrwxr-x\n-rw-rw-r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
118
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
119 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
120 testing "chmod g+x dir file" "chmod g+x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
121 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r-xr--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
122
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
123 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
124 testing "chmod g-r dir file" "chmod g-r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
125 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwx--xr-x\n-rw----r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
126
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
127 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
128 testing "chmod g-w dir file" "chmod g-w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
129 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
130
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
131 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
132 testing "chmod g-x dir file" "chmod g-x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
133 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr--r-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
134
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
135 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
136 testing "chmod o=r dir file" "chmod o=r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
137 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr--\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
138
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
139 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
140 testing "chmod o=w dir file" "chmod o=w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
141 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-x-w-\n-rw-r---w-\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
142
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
143 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
144 testing "chmod o=x dir file" "chmod o=x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
145 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-x--x\n-rw-r----x\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
146
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
147 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
148 testing "chmod o+r dir file" "chmod o+r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
149 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
150
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
151 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
152 testing "chmod o+w dir file" "chmod o+w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
153 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xrwx\n-rw-r--rw-\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
154
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
155 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
156 testing "chmod o+x dir file" "chmod o+x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
157 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r-x\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
158
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
159 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
160 testing "chmod o-r dir file" "chmod o-r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
161 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-x--x\n-rw-r-----\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
162
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
163 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
164 testing "chmod o-w dir file" "chmod o-w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
165 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
166
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
167 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
168 testing "chmod o-x dir file" "chmod o-x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
169 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr--\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
170
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
171 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
172 testing "chmod a=r dir file" "chmod a=r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
173 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "dr--r--r--\n-r--r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
174
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
175 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
176 testing "chmod a=w dir file" "chmod a=w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
177 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d-w--w--w-\n--w--w--w-\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
178
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
179 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
180 testing "chmod a=x dir file" "chmod a=x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
181 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d--x--x--x\n---x--x--x\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
182
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
183 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
184 testing "chmod a+r dir file" "chmod a+r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
185 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
186
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
187 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
188 testing "chmod a+w dir file" "chmod a+w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
189 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxrwxrwx\n-rw-rw-rw-\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
190
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
191 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
192 testing "chmod a+x dir file" "chmod a+x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
193 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rwxr-xr-x\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
194
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
195 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
196 testing "chmod a-r dir file" "chmod a-r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
197 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d-wx--x--x\n--w-------\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
198
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
199 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
200 testing "chmod a-w dir file" "chmod a-w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
201 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "dr-xr-xr-x\n-r--r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
202
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
203 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
204 testing "chmod a-x dir file" "chmod a-x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
205 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drw-r--r--\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
206
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
207 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
208 testing "chmod =r dir file" "chmod =r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
209 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "dr--r--r--\n-r--r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
210
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
211 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
212 testing "chmod =w dir file" "chmod =w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
213 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d-w-------\n--w-------\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
214
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
215 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
216 testing "chmod =x dir file" "chmod =x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
217 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d--x--x--x\n---x--x--x\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
218
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
219 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
220 testing "chmod +r dir file" "chmod +r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
221 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
222
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
223 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
224 testing "chmod +w dir file" "chmod +w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
225 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
226
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
227 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
228 testing "chmod +x dir file" "chmod +x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
229 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drwxr-xr-x\n-rwxr-xr-x\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
230
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
231 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
232 testing "chmod -r dir file" "chmod -r dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
233 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "d-wx--x--x\n--w-------\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
234
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
235 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
236 testing "chmod -w dir file" "chmod -w dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
237 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "dr-xr-xr-x\n-r--r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
238
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
239 rm -rf dir file && mkdir dir && touch file
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
240 testing "chmod -x dir file" "chmod -x dir file &&
1456
5d51c5d6df72 chmod testsuite and link testsuite.
Divya Kothari <divya.s.kothari@gmail.com>
parents: 1378
diff changeset
241 ls -ld dir file | cut -d' ' -f 1 | cut -d. -f 1" "drw-r--r--\n-rw-r--r--\n" "" ""
1377
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
242
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
243 # Removing test files for cleanup purpose
7a2aec0876fe I have developed few testsuites for toybox commands -
Divya Kothari <divya.s.kothari@gmail.com>
parents:
diff changeset
244 rm -rf dir file