@@ -38,6 +38,25 @@ not_present() {
38
38
fi
39
39
}
40
40
41
+ check_status_options () {
42
+ (cd " $1 " &&
43
+ GIT_CONFIG=" $git_config " cvs -Q status " $2 " > " ${WORKDIR} /status.out" 2>&1
44
+ )
45
+ if [ x" $? " != x" 0" ] ; then
46
+ echo " Error from cvs status: $1 $2 " >> " ${WORKDIR} /marked.log"
47
+ return 1;
48
+ fi
49
+ got=" $( sed -n -e ' s/^\s*Sticky Options:\s*//p' " ${WORKDIR} /status.out" ) "
50
+ expect=" $3 "
51
+ if [ x" $expect " = x" " ] ; then
52
+ expect=" (none)"
53
+ fi
54
+ test x" $got " = x" $expect "
55
+ stat=$?
56
+ echo " cvs status: $1 $2 $stat '$3 ' '$got '" >> " ${WORKDIR} /marked.log"
57
+ return $stat
58
+ }
59
+
41
60
cvs > /dev/null 2>&1
42
61
if test $? -ne 1
43
62
then
@@ -233,6 +252,22 @@ test_expect_success 'cvs co another copy (guess)' '
233
252
marked_as cvswork2/subdir newfile.c ""
234
253
'
235
254
255
+ test_expect_success ' cvs status - sticky options' '
256
+ check_status_options cvswork2 textfile.c "" &&
257
+ check_status_options cvswork2 binfile.bin -kb &&
258
+ check_status_options cvswork2 .gitattributes "" &&
259
+ check_status_options cvswork2 mixedUp.c -kb &&
260
+ check_status_options cvswork2 multiline.c -kb &&
261
+ check_status_options cvswork2 multilineTxt.c "" &&
262
+ check_status_options cvswork2/subdir withCr.bin -kb &&
263
+ check_status_options cvswork2 subdir/withCr.bin -kb &&
264
+ check_status_options cvswork2/subdir file.h "" &&
265
+ check_status_options cvswork2 subdir/file.h "" &&
266
+ check_status_options cvswork2/subdir unspecified.other "" &&
267
+ check_status_options cvswork2/subdir newfile.bin "" &&
268
+ check_status_options cvswork2/subdir newfile.c ""
269
+ '
270
+
236
271
test_expect_success ' add text (guess)' '
237
272
(cd cvswork &&
238
273
echo "simpleText" > simpleText.c &&
0 commit comments