/[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.752.2.178 by dprice, Tue Sep 13 02:47:56 2005 UTC revision 1.752.2.179 by dprice, Tue Sep 13 15:54:47 2005 UTC
# Line 211  echo "running status, try the command: \ Line 211  echo "running status, try the command: \
211  # special characters we are probably in big trouble.  # special characters we are probably in big trouble.
212  PROG=`basename ${testcvs}`  PROG=`basename ${testcvs}`
213    
214  # 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]*"  
215  hostname="[-_.a-zA-Z0-9]*"  hostname="[-_.a-zA-Z0-9]*"
216    
217  # Regexp to match the name of a temporary file (from cvs_temp_name).  # Regexp to match the name of a temporary file (from cvs_temp_name).
# Line 666  else Line 662  else
662    exit 1    exit 1
663  fi  fi
664    
665  # Only 8 characters of $username appear in output.  # Only 8 characters of $username appear in some output.
666  if test `echo $username |wc -c` -gt 8; then  if test `echo $username |wc -c` -gt 8; then
667    username=`echo $username |sed 's/^\(........\).*/\1/'`    username8=`echo $username |sed 's/^\(........\).*/\1/'`
668    else
669      username8=$username
670  fi  fi
671    
672    # Rarely, we need to match any username, not just the name of the user
673    # running this test.
674    #
675    # I'm not really sure what characters should be here.  a-zA-Z obviously.
676    # People complained when 0-9 were not allowed in usernames.  Other than that
677    # I'm not sure.
678    anyusername="[-a-zA-Z0-9][-a-zA-Z0-9]*"
679    
680  # now make sure that tr works on NULs  # now make sure that tr works on NULs
681  tr_tooltest1 ()  tr_tooltest1 ()
682  {  {
# Line 2306  done" Line 2312  done"
2312  '  '
2313  Annotations for sdir/ssdir/ssfile  Annotations for sdir/ssdir/ssfile
2314  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
2315  1\.1          .'"${username}"' *[0-9a-zA-Z-]*.: ssfile  1\.1          .'"$username8"' *[0-9a-zA-Z-]*.: ssfile
2316  1\.2          .'"${username}"' *[0-9a-zA-Z-]*.: ssfile line 2'  1\.2          .'"$username8"' *[0-9a-zA-Z-]*.: ssfile line 2'
2317    
2318            # Test resurrecting with strange revision numbers            # Test resurrecting with strange revision numbers
2319            cd sdir/ssdir            cd sdir/ssdir
# Line 19392  done" Line 19398  done"
19398  "  "
19399  Annotations for file1  Annotations for file1
19400  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
19401  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
19402  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
19403  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19404  1\.3          (${username} *[0-9a-zA-Z-]*): trunk file  1\.3          ($username8 *[0-9a-zA-Z-]*): trunk file
19405  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
19406  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
19407  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19408  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
19409  1\.2          (${username} *[0-9a-zA-Z-]*): line"  1\.2          ($username8 *[0-9a-zA-Z-]*): line"
19410            dotest ann-11 "${testcvs} ann -r br" \            dotest ann-11 "${testcvs} ann -r br" \
19411  "  "
19412  Annotations for file1  Annotations for file1
19413  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
19414  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
19415  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
19416  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19417  1\.1          (${username} *[0-9a-zA-Z-]*): file  1\.1          ($username8 *[0-9a-zA-Z-]*): file
19418  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
19419  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
19420  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19421  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
19422  1\.2          (${username} *[0-9a-zA-Z-]*): line  1\.2          ($username8 *[0-9a-zA-Z-]*): line
19423  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
19424  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
19425            # 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"?
19426            dotest ann-12 "${testcvs} ann -r 1.2.0.2 file1" ""            dotest ann-12 "${testcvs} ann -r 1.2.0.2 file1" ""
19427            dotest ann-13 "${testcvs} ann -r 1.2.2 file1" \            dotest ann-13 "${testcvs} ann -r 1.2.2 file1" \
19428  "  "
19429  Annotations for file1  Annotations for file1
19430  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
19431  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
19432  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
19433  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19434  1\.1          (${username} *[0-9a-zA-Z-]*): file  1\.1          ($username8 *[0-9a-zA-Z-]*): file
19435  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
19436  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
19437  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19438  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
19439  1\.2          (${username} *[0-9a-zA-Z-]*): line  1\.2          ($username8 *[0-9a-zA-Z-]*): line
19440  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
19441  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
19442            dotest_fail ann-14 "${testcvs} ann -r bill-clintons-chastity file1" \            dotest_fail ann-14 "${testcvs} ann -r bill-clintons-chastity file1" \
19443  "${PROG} \[annotate aborted\]: no such tag bill-clintons-chastity"  "${PROG} \[annotate aborted\]: no such tag bill-clintons-chastity"
19444    
# Line 19444  Annotations for file1 Line 19450  Annotations for file1
19450  "  "
19451  Annotations for first-dir/file1  Annotations for first-dir/file1
19452  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
19453  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
19454  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
19455  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19456  1\.3          (${username} *[0-9a-zA-Z-]*): trunk file  1\.3          ($username8 *[0-9a-zA-Z-]*): trunk file
19457  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
19458  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
19459  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19460  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
19461  1\.2          (${username} *[0-9a-zA-Z-]*): line"  1\.2          ($username8 *[0-9a-zA-Z-]*): line"
19462            dotest ann-r11 "${testcvs} rann -r br first-dir" \            dotest ann-r11 "${testcvs} rann -r br first-dir" \
19463  "  "
19464  Annotations for first-dir/file1  Annotations for first-dir/file1
19465  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
19466  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
19467  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
19468  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19469  1\.1          (${username} *[0-9a-zA-Z-]*): file  1\.1          ($username8 *[0-9a-zA-Z-]*): file
19470  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
19471  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
19472  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19473  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
19474  1\.2          (${username} *[0-9a-zA-Z-]*): line  1\.2          ($username8 *[0-9a-zA-Z-]*): line
19475  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
19476  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
19477            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" ""
19478            dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \            dotest ann-r13 "${testcvs} rann -r 1.2.2 first-dir/file1" \
19479  "  "
19480  Annotations for first-dir/file1  Annotations for first-dir/file1
19481  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
19482  1\.1          (${username} *[0-9a-zA-Z-]*): this  1\.1          ($username8 *[0-9a-zA-Z-]*): this
19483  1\.1          (${username} *[0-9a-zA-Z-]*): is  1\.1          ($username8 *[0-9a-zA-Z-]*): is
19484  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19485  1\.1          (${username} *[0-9a-zA-Z-]*): file  1\.1          ($username8 *[0-9a-zA-Z-]*): file
19486  1\.2          (${username} *[0-9a-zA-Z-]*):  1\.2          ($username8 *[0-9a-zA-Z-]*):
19487  1\.2          (${username} *[0-9a-zA-Z-]*): with  1\.2          ($username8 *[0-9a-zA-Z-]*): with
19488  1\.2          (${username} *[0-9a-zA-Z-]*): a  1\.2          ($username8 *[0-9a-zA-Z-]*): a
19489  1\.2          (${username} *[0-9a-zA-Z-]*): blank  1\.2          ($username8 *[0-9a-zA-Z-]*): blank
19490  1\.2          (${username} *[0-9a-zA-Z-]*): line  1\.2          ($username8 *[0-9a-zA-Z-]*): line
19491  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): and some  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): and some
19492  1\.2\.2\.1      (${username} *[0-9a-zA-Z-]*): branched content"  1\.2\.2\.1      ($username8 *[0-9a-zA-Z-]*): branched content"
19493            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" \
19494  "${PROG} \[rannotate aborted\]: no such tag bill-clintons-chastity"  "${PROG} \[rannotate aborted\]: no such tag bill-clintons-chastity"
19495    
# Line 19530  done" Line 19536  done"
19536  "  "
19537  Annotations for $file  Annotations for $file
19538  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
19539  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 "'\$'"
19540  1.2          ($username *[0-9a-zA-Z-]*): line2"  1.2          ($username8 *[0-9a-zA-Z-]*): line2"
19541    
19542            cd ../..            cd ../..
19543            rm -rf 1            rm -rf 1
# Line 22445  xx" Line 22451  xx"
22451  "  "
22452  Annotations for file1  Annotations for file1
22453  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
22454  1\.3          (${username} *[0-9a-zA-Z-]*): initial  1\.3          ($username8 *[0-9a-zA-Z-]*): initial
22455  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 "'\$'"
22456  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx Revision 1\.4  [0-9/]* [0-9:]*  ${username}  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4  [0-9/]* [0-9:]*  $username
22457  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
22458  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
22459  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): xx  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): xx
22460  1\.4\.2\.1      (${username} *[0-9a-zA-Z-]*): br-change"  1\.4\.2\.1      ($username8 *[0-9a-zA-Z-]*): br-change"
22461            dotest keywordlog-23 "${testcvs} ann -r HEAD file1" \            dotest keywordlog-23 "${testcvs} ann -r HEAD file1" \
22462  "  "
22463  Annotations for file1  Annotations for file1
22464  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
22465  1\.3          (${username} *[0-9a-zA-Z-]*): initial  1\.3          ($username8 *[0-9a-zA-Z-]*): initial
22466  1\.5          (${username} *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"  1\.5          ($username8 *[0-9a-zA-Z-]*): xx "'\$'"Log: file1,v "'\$'"
22467  1\.5          (${username} *[0-9a-zA-Z-]*): xx Revision 1\.4  [0-9/]* [0-9:]*  ${username}  1\.5          ($username8 *[0-9a-zA-Z-]*): xx Revision 1\.4  [0-9/]* [0-9:]*  $username
22468  1\.5          (${username} *[0-9a-zA-Z-]*): xx First log line  1\.5          ($username8 *[0-9a-zA-Z-]*): xx First log line
22469  1\.5          (${username} *[0-9a-zA-Z-]*): xx Second log line  1\.5          ($username8 *[0-9a-zA-Z-]*): xx Second log line
22470  1\.5          (${username} *[0-9a-zA-Z-]*): xx  1\.5          ($username8 *[0-9a-zA-Z-]*): xx
22471  1\.5          (${username} *[0-9a-zA-Z-]*): change"  1\.5          ($username8 *[0-9a-zA-Z-]*): change"
22472            cd ../..            cd ../..
22473    
22474            #            #
# Line 23033  done" Line 23039  done"
23039  "  "
23040  Annotations for file1  Annotations for file1
23041  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
23042  1\.1\.4\.1      (${username} *[0-9a-zA-Z-]*): br2-1"  1\.1\.4\.1      ($username8 *[0-9a-zA-Z-]*): br2-1"
23043    
23044            dotest tagdate-17 "${testcvs} annotate -rbr2 -Dnow" \            dotest tagdate-17 "${testcvs} annotate -rbr2 -Dnow" \
23045  "  "
23046  Annotations for file1  Annotations for file1
23047  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
23048  1\.1\.4\.2      (${username} *[0-9a-zA-Z-]*): br2-2"  1\.1\.4\.2      ($username8 *[0-9a-zA-Z-]*): br2-2"
23049    
23050            # 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
23051            echo br2-1 > file3            echo br2-1 > file3
# Line 24712  add Line 24718  add
24718    
24719            cat >${TESTDIR}/lockme <<EOF            cat >${TESTDIR}/lockme <<EOF
24720  #!${TESTSHELL}  #!${TESTSHELL}
24721  line=\`grep <\$1/\$2,v 'locks ${author}:1\.[0-9];'\`  line=\`grep <\$1/\$2,v 'locks $anyusername:1\.[0-9];'\`
24722  if test -z "\$line"; then  if test -z "\$line"; then
24723    # It isn't locked    # It isn't locked
24724    exit 0    exit 0
24725  else  else
24726    user=\`echo \$line | sed -e 's/locks \\(${author}\\):[0-9.]*;.*/\\1/'\`    user=\`echo \$line | sed -e 's/locks \\($anyusername\\):[0-9.]*;.*/\\1/'\`
24727    version=\`echo \$line | sed -e 's/locks ${author}:\\([0-9.]*\\);.*/\\1/'\`    version=\`echo \$line | sed -e 's/locks $anyusername:\\([0-9.]*\\);.*/\\1/'\`
24728    echo "\$user has file a-lock locked for version  \$version" >&2    echo "\$user has file a-lock locked for version  \$version" >&2
24729    exit 1    exit 1
24730  fi  fi

Legend:
Removed from v.1.752.2.178  
changed lines
  Added in v.1.752.2.179

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