3 ad493afc 2019-08-03 stsp # Copyright (c) 2019 Stefan Sperling <stsp@openbsd.org>
5 ad493afc 2019-08-03 stsp # Permission to use, copy, modify, and distribute this software for any
6 ad493afc 2019-08-03 stsp # purpose with or without fee is hereby granted, provided that the above
7 ad493afc 2019-08-03 stsp # copyright notice and this permission notice appear in all copies.
9 ad493afc 2019-08-03 stsp # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 ad493afc 2019-08-03 stsp # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 ad493afc 2019-08-03 stsp # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 ad493afc 2019-08-03 stsp # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 ad493afc 2019-08-03 stsp # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 ad493afc 2019-08-03 stsp # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 ad493afc 2019-08-03 stsp # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 ad493afc 2019-08-03 stsp . ./common.sh
19 ad493afc 2019-08-03 stsp function test_unstage_basic {
20 ad493afc 2019-08-03 stsp local testroot=`test_init unstage_basic`
22 ad493afc 2019-08-03 stsp got checkout $testroot/repo $testroot/wt > /dev/null
24 ad493afc 2019-08-03 stsp if [ "$ret" != "0" ]; then
25 ad493afc 2019-08-03 stsp test_done "$testroot" "$ret"
29 ad493afc 2019-08-03 stsp echo "modified file" > $testroot/wt/alpha
30 ad493afc 2019-08-03 stsp (cd $testroot/wt && got rm beta > /dev/null)
31 ad493afc 2019-08-03 stsp echo "new file" > $testroot/wt/foo
32 ad493afc 2019-08-03 stsp (cd $testroot/wt && got add foo > /dev/null)
34 ad493afc 2019-08-03 stsp echo ' M alpha' > $testroot/stdout.expected
35 ad493afc 2019-08-03 stsp echo ' D beta' >> $testroot/stdout.expected
36 ad493afc 2019-08-03 stsp echo ' A foo' >> $testroot/stdout.expected
37 ad493afc 2019-08-03 stsp (cd $testroot/wt && got stage alpha beta foo > /dev/null)
39 ad493afc 2019-08-03 stsp (cd $testroot/wt && got unstage > $testroot/stdout)
41 ad493afc 2019-08-03 stsp if [ "$ret" != "0" ]; then
42 ad493afc 2019-08-03 stsp echo "got stage command succeeded unexpectedly" >&2
43 ad493afc 2019-08-03 stsp test_done "$testroot" "1"
47 ad493afc 2019-08-03 stsp echo 'G alpha' > $testroot/stdout.expected
48 ad493afc 2019-08-03 stsp echo 'D beta' >> $testroot/stdout.expected
49 ad493afc 2019-08-03 stsp echo 'G foo' >> $testroot/stdout.expected
50 ad493afc 2019-08-03 stsp cmp -s $testroot/stdout.expected $testroot/stdout
52 ad493afc 2019-08-03 stsp if [ "$ret" != "0" ]; then
53 ad493afc 2019-08-03 stsp diff -u $testroot/stdout.expected $testroot/stdout
54 ad493afc 2019-08-03 stsp test_done "$testroot" "$ret"
58 ad493afc 2019-08-03 stsp echo 'M alpha' > $testroot/stdout.expected
59 ad493afc 2019-08-03 stsp echo 'D beta' >> $testroot/stdout.expected
60 ad493afc 2019-08-03 stsp echo 'A foo' >> $testroot/stdout.expected
61 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
62 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
64 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
65 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
67 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
70 8b13ce36 2019-08-08 stsp function test_unstage_unversioned {
71 8b13ce36 2019-08-08 stsp local testroot=`test_init unstage_unversioned`
73 8b13ce36 2019-08-08 stsp got checkout $testroot/repo $testroot/wt > /dev/null
75 8b13ce36 2019-08-08 stsp if [ "$ret" != "0" ]; then
76 8b13ce36 2019-08-08 stsp test_done "$testroot" "$ret"
80 8b13ce36 2019-08-08 stsp echo "modified file" > $testroot/wt/alpha
81 8b13ce36 2019-08-08 stsp (cd $testroot/wt && got rm beta > /dev/null)
82 8b13ce36 2019-08-08 stsp echo "new file" > $testroot/wt/foo
83 8b13ce36 2019-08-08 stsp (cd $testroot/wt && got add foo > /dev/null)
85 8b13ce36 2019-08-08 stsp echo ' M alpha' > $testroot/stdout.expected
86 8b13ce36 2019-08-08 stsp echo ' D beta' >> $testroot/stdout.expected
87 8b13ce36 2019-08-08 stsp echo ' A foo' >> $testroot/stdout.expected
88 8b13ce36 2019-08-08 stsp (cd $testroot/wt && got stage > /dev/null)
90 8b13ce36 2019-08-08 stsp touch $testroot/wt/unversioned-file
92 8b13ce36 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
93 8b13ce36 2019-08-08 stsp echo ' M alpha' > $testroot/stdout.expected
94 8b13ce36 2019-08-08 stsp echo ' D beta' >> $testroot/stdout.expected
95 8b13ce36 2019-08-08 stsp echo ' A foo' >> $testroot/stdout.expected
96 8b13ce36 2019-08-08 stsp echo "? unversioned-file" >> $testroot/stdout.expected
97 8b13ce36 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
99 8b13ce36 2019-08-08 stsp if [ "$ret" != "0" ]; then
100 8b13ce36 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
101 8b13ce36 2019-08-08 stsp test_done "$testroot" "$ret"
105 8b13ce36 2019-08-08 stsp (cd $testroot/wt && got unstage > $testroot/stdout)
107 8b13ce36 2019-08-08 stsp if [ "$ret" != "0" ]; then
108 8b13ce36 2019-08-08 stsp echo "got unstage command failed unexpectedly" >&2
109 8b13ce36 2019-08-08 stsp test_done "$testroot" "1"
113 8b13ce36 2019-08-08 stsp echo 'G alpha' > $testroot/stdout.expected
114 8b13ce36 2019-08-08 stsp echo 'D beta' >> $testroot/stdout.expected
115 8b13ce36 2019-08-08 stsp echo 'G foo' >> $testroot/stdout.expected
116 8b13ce36 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
118 8b13ce36 2019-08-08 stsp if [ "$ret" != "0" ]; then
119 8b13ce36 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
120 8b13ce36 2019-08-08 stsp test_done "$testroot" "$ret"
124 8b13ce36 2019-08-08 stsp (cd $testroot/wt && got stage > /dev/null)
126 8b13ce36 2019-08-08 stsp # unstaging an unversioned path is a no-op
127 8b13ce36 2019-08-08 stsp (cd $testroot/wt && got unstage unversioned > $testroot/stdout)
129 8b13ce36 2019-08-08 stsp if [ "$ret" != "0" ]; then
130 8b13ce36 2019-08-08 stsp echo "got unstage command failed unexpectedly" >&2
131 8b13ce36 2019-08-08 stsp test_done "$testroot" "$ret"
135 8b13ce36 2019-08-08 stsp echo ' M alpha' > $testroot/stdout.expected
136 8b13ce36 2019-08-08 stsp echo ' D beta' >> $testroot/stdout.expected
137 8b13ce36 2019-08-08 stsp echo ' A foo' >> $testroot/stdout.expected
138 8b13ce36 2019-08-08 stsp echo "? unversioned-file" >> $testroot/stdout.expected
139 8b13ce36 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
140 8b13ce36 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
142 8b13ce36 2019-08-08 stsp if [ "$ret" != "0" ]; then
143 8b13ce36 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
145 8b13ce36 2019-08-08 stsp test_done "$testroot" "$ret"
148 2e1f37b0 2019-08-08 stsp function test_unstage_patch {
149 2e1f37b0 2019-08-08 stsp local testroot=`test_init unstage_patch`
151 2e1f37b0 2019-08-08 stsp jot 16 > $testroot/repo/numbers
152 2e1f37b0 2019-08-08 stsp (cd $testroot/repo && git add numbers)
153 2e1f37b0 2019-08-08 stsp git_commit $testroot/repo -m "added numbers file"
154 2e1f37b0 2019-08-08 stsp local commit_id=`git_show_head $testroot/repo`
156 2e1f37b0 2019-08-08 stsp got checkout $testroot/repo $testroot/wt > /dev/null
158 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
159 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
163 2e1f37b0 2019-08-08 stsp sed -i -e 's/^2$/a/' $testroot/wt/numbers
164 2e1f37b0 2019-08-08 stsp sed -i -e 's/^7$/b/' $testroot/wt/numbers
165 2e1f37b0 2019-08-08 stsp sed -i -e 's/^16$/c/' $testroot/wt/numbers
167 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got stage > /dev/null)
169 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
170 2e1f37b0 2019-08-08 stsp echo "got stage command failed unexpectedly" >&2
171 2e1f37b0 2019-08-08 stsp test_done "$testroot" "1"
175 2e1f37b0 2019-08-08 stsp # don't unstage any hunks
176 2e1f37b0 2019-08-08 stsp printf "n\nn\nn\n" > $testroot/patchscript
177 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got unstage -F $testroot/patchscript -p \
178 2e1f37b0 2019-08-08 stsp numbers > $testroot/stdout)
180 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
181 2e1f37b0 2019-08-08 stsp echo "got stage command failed unexpectedly" >&2
182 2e1f37b0 2019-08-08 stsp test_done "$testroot" "1"
185 2e1f37b0 2019-08-08 stsp cat > $testroot/stdout.expected <<EOF
186 2e1f37b0 2019-08-08 stsp -----------------------------------------------
187 2e1f37b0 2019-08-08 stsp @@ -1,5 +1,5 @@
194 2e1f37b0 2019-08-08 stsp -----------------------------------------------
195 2e1f37b0 2019-08-08 stsp M numbers (change 1 of 3)
196 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] n
197 2e1f37b0 2019-08-08 stsp -----------------------------------------------
198 2e1f37b0 2019-08-08 stsp @@ -4,7 +4,7 @@
207 2e1f37b0 2019-08-08 stsp -----------------------------------------------
208 2e1f37b0 2019-08-08 stsp M numbers (change 2 of 3)
209 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] n
210 2e1f37b0 2019-08-08 stsp -----------------------------------------------
211 2e1f37b0 2019-08-08 stsp @@ -13,4 +13,4 @@
217 2e1f37b0 2019-08-08 stsp -----------------------------------------------
218 2e1f37b0 2019-08-08 stsp M numbers (change 3 of 3)
219 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] n
221 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
223 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
224 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
225 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
229 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
230 2e1f37b0 2019-08-08 stsp echo " M numbers" > $testroot/stdout.expected
231 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
233 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
234 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
235 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
239 2e1f37b0 2019-08-08 stsp # unstage middle hunk
240 2e1f37b0 2019-08-08 stsp printf "n\ny\nn\n" > $testroot/patchscript
241 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got unstage -F $testroot/patchscript -p \
242 2e1f37b0 2019-08-08 stsp numbers > $testroot/stdout)
244 2e1f37b0 2019-08-08 stsp cat > $testroot/stdout.expected <<EOF
245 2e1f37b0 2019-08-08 stsp -----------------------------------------------
246 2e1f37b0 2019-08-08 stsp @@ -1,5 +1,5 @@
253 2e1f37b0 2019-08-08 stsp -----------------------------------------------
254 2e1f37b0 2019-08-08 stsp M numbers (change 1 of 3)
255 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] n
256 2e1f37b0 2019-08-08 stsp -----------------------------------------------
257 2e1f37b0 2019-08-08 stsp @@ -4,7 +4,7 @@
266 2e1f37b0 2019-08-08 stsp -----------------------------------------------
267 2e1f37b0 2019-08-08 stsp M numbers (change 2 of 3)
268 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] y
269 2e1f37b0 2019-08-08 stsp -----------------------------------------------
270 2e1f37b0 2019-08-08 stsp @@ -13,4 +13,4 @@
276 2e1f37b0 2019-08-08 stsp -----------------------------------------------
277 2e1f37b0 2019-08-08 stsp M numbers (change 3 of 3)
278 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] n
281 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
283 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
284 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
285 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
289 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
290 2e1f37b0 2019-08-08 stsp echo "MM numbers" > $testroot/stdout.expected
291 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
293 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
294 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
295 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
299 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff -s > $testroot/stdout)
301 2e1f37b0 2019-08-08 stsp echo "diff $commit_id $testroot/wt (staged changes)" \
302 2e1f37b0 2019-08-08 stsp > $testroot/stdout.expected
303 2e1f37b0 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
304 2e1f37b0 2019-08-08 stsp got tree -r $testroot/repo -i -c $commit_id \
305 2e1f37b0 2019-08-08 stsp | grep 'numbers$' | cut -d' ' -f 1 \
306 2e1f37b0 2019-08-08 stsp >> $testroot/stdout.expected
307 2e1f37b0 2019-08-08 stsp echo -n 'blob + ' >> $testroot/stdout.expected
308 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got stage -l numbers) | cut -d' ' -f 1 \
309 2e1f37b0 2019-08-08 stsp >> $testroot/stdout.expected
310 2e1f37b0 2019-08-08 stsp cat >> $testroot/stdout.expected <<EOF
311 2e1f37b0 2019-08-08 stsp --- numbers
312 2e1f37b0 2019-08-08 stsp +++ numbers
313 2e1f37b0 2019-08-08 stsp @@ -1,5 +1,5 @@
320 2e1f37b0 2019-08-08 stsp @@ -13,4 +13,4 @@
327 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
329 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
330 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
331 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
335 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff > $testroot/stdout)
336 2e1f37b0 2019-08-08 stsp echo "diff $commit_id $testroot/wt" > $testroot/stdout.expected
337 2e1f37b0 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
338 4ce46740 2019-08-08 stsp (cd $testroot/wt && got stage -l numbers) | cut -d' ' -f 1 | \
339 4ce46740 2019-08-08 stsp tr -d '\n' >> $testroot/stdout.expected
340 4ce46740 2019-08-08 stsp echo " (staged)" >> $testroot/stdout.expected
341 2e1f37b0 2019-08-08 stsp echo "file + numbers" >> $testroot/stdout.expected
342 2e1f37b0 2019-08-08 stsp cat >> $testroot/stdout.expected <<EOF
343 2e1f37b0 2019-08-08 stsp --- numbers
344 2e1f37b0 2019-08-08 stsp +++ numbers
345 2e1f37b0 2019-08-08 stsp @@ -4,7 +4,7 @@ a
355 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
357 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
358 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
359 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
363 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got stage >/dev/null)
365 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
366 2e1f37b0 2019-08-08 stsp echo "got stage command failed unexpectedly" >&2
367 2e1f37b0 2019-08-08 stsp test_done "$testroot" "1"
371 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
372 2e1f37b0 2019-08-08 stsp echo " M numbers" > $testroot/stdout.expected
373 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
375 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
376 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
377 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
381 2e1f37b0 2019-08-08 stsp # unstage last hunk
382 2e1f37b0 2019-08-08 stsp printf "n\nn\ny\n" > $testroot/patchscript
383 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got unstage -F $testroot/patchscript -p \
384 2e1f37b0 2019-08-08 stsp numbers > $testroot/stdout)
386 2e1f37b0 2019-08-08 stsp cat > $testroot/stdout.expected <<EOF
387 2e1f37b0 2019-08-08 stsp -----------------------------------------------
388 2e1f37b0 2019-08-08 stsp @@ -1,5 +1,5 @@
395 2e1f37b0 2019-08-08 stsp -----------------------------------------------
396 2e1f37b0 2019-08-08 stsp M numbers (change 1 of 3)
397 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] n
398 2e1f37b0 2019-08-08 stsp -----------------------------------------------
399 2e1f37b0 2019-08-08 stsp @@ -4,7 +4,7 @@
408 2e1f37b0 2019-08-08 stsp -----------------------------------------------
409 2e1f37b0 2019-08-08 stsp M numbers (change 2 of 3)
410 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] n
411 2e1f37b0 2019-08-08 stsp -----------------------------------------------
412 2e1f37b0 2019-08-08 stsp @@ -13,4 +13,4 @@
418 2e1f37b0 2019-08-08 stsp -----------------------------------------------
419 2e1f37b0 2019-08-08 stsp M numbers (change 3 of 3)
420 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] y
423 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
425 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
426 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
427 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
431 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
432 2e1f37b0 2019-08-08 stsp echo "MM numbers" > $testroot/stdout.expected
433 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
435 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
436 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
437 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
441 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff -s > $testroot/stdout)
443 2e1f37b0 2019-08-08 stsp echo "diff $commit_id $testroot/wt (staged changes)" \
444 2e1f37b0 2019-08-08 stsp > $testroot/stdout.expected
445 2e1f37b0 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
446 2e1f37b0 2019-08-08 stsp got tree -r $testroot/repo -i -c $commit_id \
447 2e1f37b0 2019-08-08 stsp | grep 'numbers$' | cut -d' ' -f 1 \
448 2e1f37b0 2019-08-08 stsp >> $testroot/stdout.expected
449 2e1f37b0 2019-08-08 stsp echo -n 'blob + ' >> $testroot/stdout.expected
450 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got stage -l numbers) | cut -d' ' -f 1 \
451 2e1f37b0 2019-08-08 stsp >> $testroot/stdout.expected
452 2e1f37b0 2019-08-08 stsp cat >> $testroot/stdout.expected <<EOF
453 2e1f37b0 2019-08-08 stsp --- numbers
454 2e1f37b0 2019-08-08 stsp +++ numbers
455 2e1f37b0 2019-08-08 stsp @@ -1,10 +1,10 @@
469 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
471 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
472 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
473 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
477 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff > $testroot/stdout)
478 2e1f37b0 2019-08-08 stsp echo "diff $commit_id $testroot/wt" > $testroot/stdout.expected
479 2e1f37b0 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
480 4ce46740 2019-08-08 stsp (cd $testroot/wt && got stage -l numbers) | cut -d' ' -f 1 | \
481 4ce46740 2019-08-08 stsp tr -d '\n' >> $testroot/stdout.expected
482 4ce46740 2019-08-08 stsp echo " (staged)" >> $testroot/stdout.expected
483 2e1f37b0 2019-08-08 stsp echo "file + numbers" >> $testroot/stdout.expected
484 2e1f37b0 2019-08-08 stsp cat >> $testroot/stdout.expected <<EOF
485 2e1f37b0 2019-08-08 stsp --- numbers
486 2e1f37b0 2019-08-08 stsp +++ numbers
487 2e1f37b0 2019-08-08 stsp @@ -13,4 +13,4 @@ b
494 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
496 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
497 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
498 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
502 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got stage >/dev/null)
504 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
505 2e1f37b0 2019-08-08 stsp echo "got stage command failed unexpectedly" >&2
506 2e1f37b0 2019-08-08 stsp test_done "$testroot" "1"
510 ad493afc 2019-08-03 stsp (cd $testroot/wt && got status > $testroot/stdout)
511 2e1f37b0 2019-08-08 stsp echo " M numbers" > $testroot/stdout.expected
512 ad493afc 2019-08-03 stsp cmp -s $testroot/stdout.expected $testroot/stdout
514 ad493afc 2019-08-03 stsp if [ "$ret" != "0" ]; then
515 ad493afc 2019-08-03 stsp diff -u $testroot/stdout.expected $testroot/stdout
516 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
520 2e1f37b0 2019-08-08 stsp # unstage all hunks
521 2e1f37b0 2019-08-08 stsp printf "y\ny\ny\n" > $testroot/patchscript
522 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got unstage -F $testroot/patchscript -p \
523 2e1f37b0 2019-08-08 stsp numbers > $testroot/stdout)
525 2e1f37b0 2019-08-08 stsp cat > $testroot/stdout.expected <<EOF
526 2e1f37b0 2019-08-08 stsp -----------------------------------------------
527 2e1f37b0 2019-08-08 stsp @@ -1,5 +1,5 @@
534 2e1f37b0 2019-08-08 stsp -----------------------------------------------
535 2e1f37b0 2019-08-08 stsp M numbers (change 1 of 3)
536 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] y
537 2e1f37b0 2019-08-08 stsp -----------------------------------------------
538 2e1f37b0 2019-08-08 stsp @@ -4,7 +4,7 @@
547 2e1f37b0 2019-08-08 stsp -----------------------------------------------
548 2e1f37b0 2019-08-08 stsp M numbers (change 2 of 3)
549 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] y
550 2e1f37b0 2019-08-08 stsp -----------------------------------------------
551 2e1f37b0 2019-08-08 stsp @@ -13,4 +13,4 @@
557 2e1f37b0 2019-08-08 stsp -----------------------------------------------
558 2e1f37b0 2019-08-08 stsp M numbers (change 3 of 3)
559 2e1f37b0 2019-08-08 stsp unstage this change? [y/n/q] y
562 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
564 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
565 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
566 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
570 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
571 2e1f37b0 2019-08-08 stsp echo "M numbers" > $testroot/stdout.expected
572 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
574 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
575 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
576 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
580 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff -s > $testroot/stdout)
581 2e1f37b0 2019-08-08 stsp echo -n > $testroot/stdout.expected
582 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
584 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
585 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
586 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
590 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff > $testroot/stdout)
592 2e1f37b0 2019-08-08 stsp echo "diff $commit_id $testroot/wt" > $testroot/stdout.expected
593 2e1f37b0 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
594 2e1f37b0 2019-08-08 stsp got tree -r $testroot/repo -i -c $commit_id \
595 2e1f37b0 2019-08-08 stsp | grep 'numbers$' | cut -d' ' -f 1 \
596 2e1f37b0 2019-08-08 stsp >> $testroot/stdout.expected
597 2e1f37b0 2019-08-08 stsp echo 'file + numbers' >> $testroot/stdout.expected
598 2e1f37b0 2019-08-08 stsp cat >> $testroot/stdout.expected <<EOF
599 2e1f37b0 2019-08-08 stsp --- numbers
600 2e1f37b0 2019-08-08 stsp +++ numbers
601 2e1f37b0 2019-08-08 stsp @@ -1,10 +1,10 @@
614 2e1f37b0 2019-08-08 stsp @@ -13,4 +13,4 @@
621 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
623 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
624 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
626 ad493afc 2019-08-03 stsp test_done "$testroot" "$ret"
630 2e1f37b0 2019-08-08 stsp function test_unstage_patch_added {
631 2e1f37b0 2019-08-08 stsp local testroot=`test_init unstage_patch_added`
632 2e1f37b0 2019-08-08 stsp local commit_id=`git_show_head $testroot/repo`
634 2e1f37b0 2019-08-08 stsp got checkout $testroot/repo $testroot/wt > /dev/null
636 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
637 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
641 2e1f37b0 2019-08-08 stsp echo "new" > $testroot/wt/epsilon/new
642 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got add epsilon/new > /dev/null)
644 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got stage > /dev/null)
646 2e1f37b0 2019-08-08 stsp printf "y\n" > $testroot/patchscript
647 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got unstage -F $testroot/patchscript -p \
648 2e1f37b0 2019-08-08 stsp epsilon/new > $testroot/stdout)
650 2e1f37b0 2019-08-08 stsp echo "A epsilon/new" > $testroot/stdout.expected
651 2e1f37b0 2019-08-08 stsp echo "unstage this addition? [y/n] y" >> $testroot/stdout.expected
652 2e1f37b0 2019-08-08 stsp echo "G epsilon/new" >> $testroot/stdout.expected
653 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
655 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
656 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
657 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
661 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
662 2e1f37b0 2019-08-08 stsp echo "A epsilon/new" > $testroot/stdout.expected
663 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
665 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
666 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
667 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
671 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff -s > $testroot/stdout)
672 2e1f37b0 2019-08-08 stsp echo -n > $testroot/stdout.expected
673 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
675 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
676 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
677 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
681 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff > $testroot/stdout)
683 2e1f37b0 2019-08-08 stsp echo "diff $commit_id $testroot/wt" > $testroot/stdout.expected
684 2e1f37b0 2019-08-08 stsp echo 'blob - /dev/null' >> $testroot/stdout.expected
685 2e1f37b0 2019-08-08 stsp echo 'file + epsilon/new' >> $testroot/stdout.expected
686 2e1f37b0 2019-08-08 stsp echo "--- epsilon/new" >> $testroot/stdout.expected
687 2e1f37b0 2019-08-08 stsp echo "+++ epsilon/new" >> $testroot/stdout.expected
688 2e1f37b0 2019-08-08 stsp echo "@@ -0,0 +1 @@" >> $testroot/stdout.expected
689 2e1f37b0 2019-08-08 stsp echo "+new" >> $testroot/stdout.expected
690 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
692 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
693 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
695 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
698 2e1f37b0 2019-08-08 stsp function test_unstage_patch_removed {
699 2e1f37b0 2019-08-08 stsp local testroot=`test_init unstage_patch_removed`
700 2e1f37b0 2019-08-08 stsp local commit_id=`git_show_head $testroot/repo`
702 2e1f37b0 2019-08-08 stsp got checkout $testroot/repo $testroot/wt > /dev/null
704 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
705 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
709 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got rm beta > /dev/null)
710 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got stage > /dev/null)
712 2e1f37b0 2019-08-08 stsp printf "y\n" > $testroot/patchscript
713 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got unstage -F $testroot/patchscript -p \
714 2e1f37b0 2019-08-08 stsp beta > $testroot/stdout)
716 2e1f37b0 2019-08-08 stsp echo "D beta" > $testroot/stdout.expected
717 2e1f37b0 2019-08-08 stsp echo "unstage this deletion? [y/n] y" >> $testroot/stdout.expected
718 2e1f37b0 2019-08-08 stsp echo "D beta" >> $testroot/stdout.expected
719 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
721 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
722 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
723 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
727 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
728 2e1f37b0 2019-08-08 stsp echo "D beta" > $testroot/stdout.expected
729 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
731 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
732 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
733 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
737 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff -s > $testroot/stdout)
738 2e1f37b0 2019-08-08 stsp echo -n > $testroot/stdout.expected
739 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
741 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
742 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
743 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
747 2e1f37b0 2019-08-08 stsp (cd $testroot/wt && got diff > $testroot/stdout)
749 2e1f37b0 2019-08-08 stsp echo "diff $commit_id $testroot/wt" \
750 2e1f37b0 2019-08-08 stsp > $testroot/stdout.expected
751 2e1f37b0 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
752 2e1f37b0 2019-08-08 stsp got tree -r $testroot/repo -i | grep 'beta$' | cut -d' ' -f 1 \
753 2e1f37b0 2019-08-08 stsp >> $testroot/stdout.expected
754 2e1f37b0 2019-08-08 stsp echo 'file + /dev/null' >> $testroot/stdout.expected
755 2e1f37b0 2019-08-08 stsp echo "--- beta" >> $testroot/stdout.expected
756 2e1f37b0 2019-08-08 stsp echo "+++ beta" >> $testroot/stdout.expected
757 2e1f37b0 2019-08-08 stsp echo "@@ -1 +0,0 @@" >> $testroot/stdout.expected
758 2e1f37b0 2019-08-08 stsp echo "-beta" >> $testroot/stdout.expected
759 2e1f37b0 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
761 2e1f37b0 2019-08-08 stsp if [ "$ret" != "0" ]; then
762 2e1f37b0 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
764 2e1f37b0 2019-08-08 stsp test_done "$testroot" "$ret"
767 19e4b907 2019-08-08 stsp function test_unstage_patch_quit {
768 19e4b907 2019-08-08 stsp local testroot=`test_init unstage_patch_quit`
770 19e4b907 2019-08-08 stsp jot 16 > $testroot/repo/numbers
771 19e4b907 2019-08-08 stsp echo zzz > $testroot/repo/zzz
772 19e4b907 2019-08-08 stsp (cd $testroot/repo && git add numbers zzz)
773 19e4b907 2019-08-08 stsp git_commit $testroot/repo -m "added files"
774 19e4b907 2019-08-08 stsp local commit_id=`git_show_head $testroot/repo`
776 19e4b907 2019-08-08 stsp got checkout $testroot/repo $testroot/wt > /dev/null
778 19e4b907 2019-08-08 stsp if [ "$ret" != "0" ]; then
779 19e4b907 2019-08-08 stsp test_done "$testroot" "$ret"
783 19e4b907 2019-08-08 stsp sed -i -e 's/^2$/a/' $testroot/wt/numbers
784 19e4b907 2019-08-08 stsp sed -i -e 's/^7$/b/' $testroot/wt/numbers
785 19e4b907 2019-08-08 stsp sed -i -e 's/^16$/c/' $testroot/wt/numbers
786 19e4b907 2019-08-08 stsp (cd $testroot/wt && got rm zzz > /dev/null)
787 19e4b907 2019-08-08 stsp (cd $testroot/wt && got stage > /dev/null)
789 19e4b907 2019-08-08 stsp # unstage first hunk and quit; and don't pass a path argument to
790 19e4b907 2019-08-08 stsp # ensure that we don't skip asking about the 'zzz' file after 'quit'
791 19e4b907 2019-08-08 stsp printf "y\nq\nn\n" > $testroot/patchscript
792 19e4b907 2019-08-08 stsp (cd $testroot/wt && got unstage -F $testroot/patchscript -p \
793 19e4b907 2019-08-08 stsp > $testroot/stdout)
795 19e4b907 2019-08-08 stsp if [ "$ret" != "0" ]; then
796 19e4b907 2019-08-08 stsp echo "got stage command failed unexpectedly" >&2
797 19e4b907 2019-08-08 stsp test_done "$testroot" "1"
800 19e4b907 2019-08-08 stsp cat > $testroot/stdout.expected <<EOF
801 19e4b907 2019-08-08 stsp -----------------------------------------------
802 19e4b907 2019-08-08 stsp @@ -1,5 +1,5 @@
809 19e4b907 2019-08-08 stsp -----------------------------------------------
810 19e4b907 2019-08-08 stsp M numbers (change 1 of 3)
811 19e4b907 2019-08-08 stsp unstage this change? [y/n/q] y
812 19e4b907 2019-08-08 stsp -----------------------------------------------
813 19e4b907 2019-08-08 stsp @@ -4,7 +4,7 @@
822 19e4b907 2019-08-08 stsp -----------------------------------------------
823 19e4b907 2019-08-08 stsp M numbers (change 2 of 3)
824 19e4b907 2019-08-08 stsp unstage this change? [y/n/q] q
827 19e4b907 2019-08-08 stsp unstage this deletion? [y/n] n
829 19e4b907 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
831 19e4b907 2019-08-08 stsp if [ "$ret" != "0" ]; then
832 19e4b907 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
833 19e4b907 2019-08-08 stsp test_done "$testroot" "$ret"
837 19e4b907 2019-08-08 stsp (cd $testroot/wt && got status > $testroot/stdout)
838 19e4b907 2019-08-08 stsp echo "MM numbers" > $testroot/stdout.expected
839 19e4b907 2019-08-08 stsp echo " D zzz" >> $testroot/stdout.expected
840 19e4b907 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
842 19e4b907 2019-08-08 stsp if [ "$ret" != "0" ]; then
843 19e4b907 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
844 19e4b907 2019-08-08 stsp test_done "$testroot" "$ret"
848 19e4b907 2019-08-08 stsp (cd $testroot/wt && got diff > $testroot/stdout)
850 19e4b907 2019-08-08 stsp echo "diff $commit_id $testroot/wt" > $testroot/stdout.expected
851 19e4b907 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
852 4ce46740 2019-08-08 stsp (cd $testroot/wt && got stage -l numbers) | cut -d' ' -f 1 | \
853 4ce46740 2019-08-08 stsp tr -d '\n' >> $testroot/stdout.expected
854 4ce46740 2019-08-08 stsp echo " (staged)" >> $testroot/stdout.expected
855 19e4b907 2019-08-08 stsp echo "file + numbers" >> $testroot/stdout.expected
856 19e4b907 2019-08-08 stsp echo "--- numbers" >> $testroot/stdout.expected
857 19e4b907 2019-08-08 stsp echo "+++ numbers" >> $testroot/stdout.expected
858 19e4b907 2019-08-08 stsp echo "@@ -1,5 +1,5 @@" >> $testroot/stdout.expected
859 19e4b907 2019-08-08 stsp echo " 1" >> $testroot/stdout.expected
860 19e4b907 2019-08-08 stsp echo "-2" >> $testroot/stdout.expected
861 19e4b907 2019-08-08 stsp echo "+a" >> $testroot/stdout.expected
862 19e4b907 2019-08-08 stsp echo " 3" >> $testroot/stdout.expected
863 19e4b907 2019-08-08 stsp echo " 4" >> $testroot/stdout.expected
864 19e4b907 2019-08-08 stsp echo " 5" >> $testroot/stdout.expected
865 19e4b907 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
867 19e4b907 2019-08-08 stsp if [ "$ret" != "0" ]; then
868 19e4b907 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
869 19e4b907 2019-08-08 stsp test_done "$testroot" "$ret"
873 19e4b907 2019-08-08 stsp (cd $testroot/wt && got diff -s > $testroot/stdout)
874 19e4b907 2019-08-08 stsp echo "diff $commit_id $testroot/wt (staged changes)" \
875 19e4b907 2019-08-08 stsp > $testroot/stdout.expected
876 19e4b907 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
877 19e4b907 2019-08-08 stsp got tree -r $testroot/repo -i -c $commit_id \
878 19e4b907 2019-08-08 stsp | grep 'numbers$' | cut -d' ' -f 1 \
879 19e4b907 2019-08-08 stsp >> $testroot/stdout.expected
880 19e4b907 2019-08-08 stsp echo -n 'blob + ' >> $testroot/stdout.expected
881 19e4b907 2019-08-08 stsp (cd $testroot/wt && got stage -l numbers) | cut -d' ' -f 1 \
882 19e4b907 2019-08-08 stsp >> $testroot/stdout.expected
883 19e4b907 2019-08-08 stsp cat >> $testroot/stdout.expected <<EOF
884 19e4b907 2019-08-08 stsp --- numbers
885 19e4b907 2019-08-08 stsp +++ numbers
886 19e4b907 2019-08-08 stsp @@ -4,7 +4,7 @@
895 19e4b907 2019-08-08 stsp @@ -13,4 +13,4 @@
902 19e4b907 2019-08-08 stsp echo -n 'blob - ' >> $testroot/stdout.expected
903 19e4b907 2019-08-08 stsp got tree -r $testroot/repo -i | grep 'zzz$' | cut -d' ' -f 1 \
904 19e4b907 2019-08-08 stsp >> $testroot/stdout.expected
905 19e4b907 2019-08-08 stsp echo 'blob + /dev/null' >> $testroot/stdout.expected
906 19e4b907 2019-08-08 stsp echo "--- zzz" >> $testroot/stdout.expected
907 19e4b907 2019-08-08 stsp echo "+++ /dev/null" >> $testroot/stdout.expected
908 19e4b907 2019-08-08 stsp echo "@@ -1 +0,0 @@" >> $testroot/stdout.expected
909 19e4b907 2019-08-08 stsp echo "-zzz" >> $testroot/stdout.expected
910 19e4b907 2019-08-08 stsp cmp -s $testroot/stdout.expected $testroot/stdout
912 19e4b907 2019-08-08 stsp if [ "$ret" != "0" ]; then
913 19e4b907 2019-08-08 stsp diff -u $testroot/stdout.expected $testroot/stdout
915 19e4b907 2019-08-08 stsp test_done "$testroot" "$ret"
918 ad493afc 2019-08-03 stsp run_test test_unstage_basic
919 8b13ce36 2019-08-08 stsp run_test test_unstage_unversioned
920 2e1f37b0 2019-08-08 stsp run_test test_unstage_patch
921 2e1f37b0 2019-08-08 stsp run_test test_unstage_patch_added
922 2e1f37b0 2019-08-08 stsp run_test test_unstage_patch_removed
923 19e4b907 2019-08-08 stsp run_test test_unstage_patch_quit