/[cvs]/ccvs/src/sanity.sh
ViewVC logotype

Diff of /ccvs/src/sanity.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1085 by dprice, Tue Sep 13 02:46:31 2005 UTC revision 1.1086 by dprice, Tue Sep 13 18:12:22 2005 UTC
# Line 452  CPROG=`basename ${testcvs} |sed 's/\.exe Line 452  CPROG=`basename ${testcvs} |sed 's/\.exe
452  SPROG=`basename ${servercvs} |sed 's/\.exe$//'`  SPROG=`basename ${servercvs} |sed 's/\.exe$//'`
453    
454    
455  # Regexp to match an author name.  I'm not really sure what characters  # Match the hostname
 # should be here.  a-zA-Z obviously.  People complained when 0-9 were  
 # not allowed in usernames.  Other than that I'm not sure.  
 username="[-a-zA-Z0-9][-a-zA-Z0-9]*"  
 author="[-a-zA-Z0-9][-a-zA-Z0-9]*"  
456  hostname="[-_.a-zA-Z0-9]*"  hostname="[-_.a-zA-Z0-9]*"
457    
458  # Regexp to match a commitid  # Regexp to match a commitid
# Line 1015  else Line 1011  else
1011    exit 1    exit 1
1012  fi  fi
1013    
1014  # Only 8 characters of $username appear in output.  # Only 8 characters of $username appear in some output.
1015  if test `echo $username |wc -c` -gt 8; then  if test `echo $username |wc -c` -gt 8; then
1016    username=`echo $username |sed 's/^\(........\).*/\1/'`    username8=`echo $username |sed 's/^\(........\).*/\1/'`
1017    else
1018      username8=$username
1019  fi  fi
1020    
1021    # Rarely, we need to match any username, not just the name of the user
1022    # running this test.
1023    #
1024    # I'm not really sure what characters should be here.  a-zA-Z obviously.
1025    # People complained when 0-9 were not allowed in usernames.  Other than that
1026    # I'm not sure.
1027    anyusername="[-a-zA-Z0-9][-a-zA-Z0-9]*"
1028    
1029  # now make sure that tr works on NULs  # now make sure that tr works on NULs
1030  tr_tooltest1 ()  tr_tooltest1 ()
1031  {  {
# Line 3004  new revision: 3\.1\.2\.1; previous revis Line 3010  new revision: 3\.1\.2\.1; previous revis
3010  '  '
3011  Annotations for sdir/ssdir/ssfile  Annotations for sdir/ssdir/ssfile
3012  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
3013  1\.1          .'"${username}"' *[0-9a-zA-Z-]*.: ssfile  1\.1          .'"$username8"' *[0-9a-zA-Z-]*.: ssfile
3014  1\.2          .'"${username}"' *[0-9a-zA-Z-]*.: ssfile line 2'  1\.2          .'"$username8"' *[0-9a-zA-Z-]*.: ssfile line 2'
3015    
3016            # Test resurrecting with strange revision numbers            # Test resurrecting with strange revision numbers
3017            cd sdir/ssdir            cd sdir/ssdir
# Line 21696  new revision: 1\.2\.2\.1; previous revis Line 21702  new revision: 1\.2\.2\.1; previous revis
21702  "  "
21703  Annotations for file1  Annotations for file1
21704  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21705  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
21706  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
21707  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21708  1\.3          (${username} *[0-9a-zA-Z-]*): trunk file  1\.3          ($username8 *[0-9a-zA-Z-]*): trunk file
21709  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
21710  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
21711  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21712  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
21713  1\.2          (${username} *[0-9a-zA-Z-]*): line"  1\.2          ($username8 *[0-9a-zA-Z-]*): line"
21714            dotest ann-11 "${testcvs} ann -r br" \            dotest ann-11 "${testcvs} ann -r br" \
21715  "  "
21716  Annotations for file1  Annotations for file1
21717  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21718  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
21719  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
21720  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21721  1\.1          (${username} *[0-9a-zA-Z-]*): file  1\.1          ($username8 *[0-9a-zA-Z-]*): file
21722  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
21723  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
21724  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21725  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
21726  1\.2          (${username} *[0-9a-zA-Z-]*): line  1\.2          ($username8 *[0-9a-zA-Z-]*): line
21727  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
21728  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
21729            # FIXCVS: shouldn't "-r 1.2.0.2" be the same as "-r br"?            # FIXCVS: shouldn't "-r 1.2.0.2" be the same as "-r br"?
21730            dotest ann-12 "${testcvs} ann -r 1.2.0.2 file1" ""            dotest ann-12 "${testcvs} ann -r 1.2.0.2 file1" ""
21731            dotest ann-13 "${testcvs} ann -r 1.2.2 file1" \            dotest ann-13 "${testcvs} ann -r 1.2.2 file1" \
21732  "  "
21733  Annotations for file1  Annotations for file1
21734  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21735  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
21736  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
21737  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21738  1\.1          (${username} *[0-9a-zA-Z-]*): file  1\.1          ($username8 *[0-9a-zA-Z-]*): file
21739  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
21740  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
21741  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21742  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
21743  1\.2          (${username} *[0-9a-zA-Z-]*): line  1\.2          ($username8 *[0-9a-zA-Z-]*): line
21744  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
21745  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
21746            dotest_fail ann-14 "$testcvs ann -r bill-clintons-chastity file1" \            dotest_fail ann-14 "$testcvs ann -r bill-clintons-chastity file1" \
21747  "$SPROG \[annotate aborted\]: no such tag \`bill-clintons-chastity'"  "$SPROG \[annotate aborted\]: no such tag \`bill-clintons-chastity'"
21748    
# Line 21748  Annotations for file1 Line 21754  Annotations for file1
21754  "  "
21755  Annotations for first-dir/file1  Annotations for first-dir/file1
21756  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21757  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
21758  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
21759  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21760  1\.3          (${username} *[0-9a-zA-Z-]*): trunk file  1\.3          ($username8 *[0-9a-zA-Z-]*): trunk file
21761  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
21762  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
21763  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21764  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
21765  1\.2          (${username} *[0-9a-zA-Z-]*): line"  1\.2          ($username8 *[0-9a-zA-Z-]*): line"
21766            dotest ann-r11 "${testcvs} rann -r br first-dir" \            dotest ann-r11 "${testcvs} rann -r br first-dir" \
21767  "  "
21768  Annotations for first-dir/file1  Annotations for first-dir/file1
21769  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21770  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
21771  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
21772  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21773  1\.1          (${username} *[0-9a-zA-Z-]*): file  1\.1          ($username8 *[0-9a-zA-Z-]*): file
21774  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
21775  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
21776  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21777  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
21778  1\.2          (${username} *[0-9a-zA-Z-]*): line  1\.2          ($username8 *[0-9a-zA-Z-]*): line
21779  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
21780  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
21781            dotest ann-r12 "${testcvs} rann -r 1.2.0.2 first-dir/file1" ""            dotest ann-r12 "${testcvs} rann -r 1.2.0.2 first-dir/file1" ""
21782            dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \            dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \
21783  "  "
21784  Annotations for first-dir/file1  Annotations for first-dir/file1
21785  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21786  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
21787  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
21788  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21789  1\.1          (${username} *[0-9a-zA-Z-]*): file  1\.1          ($username8 *[0-9a-zA-Z-]*): file
21790  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
21791  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
21792  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
21793  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
21794  1\.2          (${username} *[0-9a-zA-Z-]*): line  1\.2          ($username8 *[0-9a-zA-Z-]*): line
21795  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
21796  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
21797            dotest_fail ann-r14 "$testcvs rann -r bill-clintons-chastity first-dir/file1" \            dotest_fail ann-r14 "$testcvs rann -r bill-clintons-chastity first-dir/file1" \
21798  "$SPROG \[rannotate aborted\]: no such tag \`bill-clintons-chastity'"  "$SPROG \[rannotate aborted\]: no such tag \`bill-clintons-chastity'"
21799    
# Line 21827  $SPROG add: use .$SPROG commit. to add t Line 21833  $SPROG add: use .$SPROG commit. to add t
21833  "  "
21834  Annotations for $file  Annotations for $file
21835  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
21836  1.2          ($username *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* [0-9:]* $username Exp "'\$'"  1.2          ($username8 *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* [0-9:]* $username Exp "'\$'"
21837  1.2          ($username *[0-9a-zA-Z-]*): line2"  1.2          ($username8 *[0-9a-zA-Z-]*): line2"
21838    
21839            dokeep            dokeep
21840            cd ../..            cd ../..
# Line 24749  xx" Line 24755  xx"
24755  "  "
24756  Annotations for file1  Annotations for file1
24757  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
24758  1\.3          (${username} *[0-9a-zA-Z-]*): initial  1\.3          ($username8 *[0-9a-zA-Z-]*): initial
24759  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
24760  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  ${username}  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  $username
24761  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx First log line  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx First log line
24762  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx Second log line  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx Second log line
24763  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx
24764  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): br-change"  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): br-change"
24765            dotest keywordlog-23 "${testcvs} ann -r HEAD file1" \            dotest keywordlog-23 "${testcvs} ann -r HEAD file1" \
24766  "  "
24767  Annotations for file1  Annotations for file1
24768  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
24769  1\.3          (${username} *[0-9a-zA-Z-]*): initial  1\.3          ($username8 *[0-9a-zA-Z-]*): initial
24770  1\.5          (${username} *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"  1\.5          ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
24771  1\.5          (${username} *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  ${username}  1\.5          ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4  ${RCSKEYDATE}  $username
24772  1\.5          (${username} *[0-9a-zA-Z-]*): xx First log line  1\.5          ($username8 *[0-9a-zA-Z-]*): xx First log line
24773  1\.5          (${username} *[0-9a-zA-Z-]*): xx Second log line  1\.5          ($username8 *[0-9a-zA-Z-]*): xx Second log line
24774  1\.5          (${username} *[0-9a-zA-Z-]*): xx  1\.5          ($username8 *[0-9a-zA-Z-]*): xx
24775  1\.5          (${username} *[0-9a-zA-Z-]*): change"  1\.5          ($username8 *[0-9a-zA-Z-]*): change"
24776            cd ../..            cd ../..
24777    
24778            #            #
# Line 25410  ${PLUS}br2-2" Line 25416  ${PLUS}br2-2"
25416  "  "
25417  Annotations for file1  Annotations for file1
25418  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
25419  1\.1\.4\.1      (${username} *[0-9a-zA-Z-]*): br2-1"  1\.1\.4\.1      ($username8 *[0-9a-zA-Z-]*): br2-1"
25420    
25421            dotest tagdate-17 "${testcvs} annotate -rbr2 -Dnow" \            dotest tagdate-17 "${testcvs} annotate -rbr2 -Dnow" \
25422  "  "
25423  Annotations for file1  Annotations for file1
25424  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
25425  1\.1\.4\.2      (${username} *[0-9a-zA-Z-]*): br2-2"  1\.1\.4\.2      ($username8 *[0-9a-zA-Z-]*): br2-2"
25426    
25427            # Now check to see what happens when we add files to br2 and trunk            # Now check to see what happens when we add files to br2 and trunk
25428            echo br2-1 > file3            echo br2-1 > file3
# Line 27062  add Line 27068  add
27068    
27069            cat >${TESTDIR}/lockme <<EOF            cat >${TESTDIR}/lockme <<EOF
27070  #!${TESTSHELL}  #!${TESTSHELL}
27071  line=\`grep <\$1/\$2,v 'locks ${author}:1\.[0-9];'\`  line=\`grep <\$1/\$2,v 'locks $anyusername:1\.[0-9];'\`
27072  if test -z "\$line"; then  if test -z "\$line"; then
27073    # It isn't locked    # It isn't locked
27074    exit 0    exit 0
27075  else  else
27076    user=\`echo \$line | sed -e 's/locks \\(${author}\\):[0-9.]*;.*/\\1/'\`    user=\`echo \$line | sed -e 's/locks \\($anyusername\\):[0-9.]*;.*/\\1/'\`
27077    version=\`echo \$line | sed -e 's/locks ${author}:\\([0-9.]*\\);.*/\\1/'\`    version=\`echo \$line | sed -e 's/locks $anyusername:\\([0-9.]*\\);.*/\\1/'\`
27078    echo "\$user has file a-lock locked for version  \$version" >&2    echo "\$user has file a-lock locked for version  \$version" >&2
27079    exit 1    exit 1
27080  fi  fi

Legend:
Removed from v.1.1085  
changed lines
  Added in v.1.1086

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26