[m-rev.] diff: fix completion test case failure

Simon Taylor stayl at cs.mu.OZ.AU
Sun Apr 14 18:54:51 AEST 2002


Estimated hours taken: 0.2

tests/debugger/completion.exp2:
tests/debugger/completion.exp4:
tests/debugger/completion.exp5:
	Handle differences in the output depending on whether the
	declarative debugger is enabled or disabled.

tests/Mmake.common:
	Handle `.exp4' and `.exp5' files.

Index: Mmake.common
===================================================================
RCS file: /home/mercury1/repository/tests/Mmake.common,v
retrieving revision 1.22
diff -u -u -r1.22 Mmake.common
--- Mmake.common	29 Jun 2001 08:10:42 -0000	1.22
+++ Mmake.common	14 Apr 2002 08:45:25 -0000
@@ -41,8 +41,8 @@
 #
 # For some test cases, there is more than one valid output.
 # We try matching the output with the `.exp' file, and if that
-# doesn't succeed, and there is a `.exp2' and/or a `.exp3' file,
-# then we try matching against those too.  If none succeed,
+# doesn't succeed, and there are `.exp2', `.exp3', `.exp4' or `.exp5'
+# files, then we try matching against those too.  If none succeed,
 # the shortest of the diffs is put into the `.res' file.
 #
 %.res: %.exp %.out
@@ -60,6 +60,14 @@
 		diff $(DIFF_OPTS) $*.exp3 $*.out > $*.res3 && \
 		echo "Matched $*.exp3" && \
 		cp $*.res3 $@; } || \
+	{ test -f $*.exp4 && \
+		diff $(DIFF_OPTS) $*.exp4 $*.out > $*.res4 && \
+		echo "Matched $*.exp4" && \
+		cp $*.res4 $@; } || \
+	{ test -f $*.exp5 && \
+		diff $(DIFF_OPTS) $*.exp5 $*.out > $*.res5 && \
+		echo "Matched $*.exp5" && \
+		cp $*.res5 $@; } || \
 	{ shortest=`wc -l $*.res[1-3] | grep -v total | sort -n | \
 		head -1 | awk '{ print $$2; }' `; \
 		echo "** $*.out did not match the expected output"; \
Index: debugger/completion.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/completion.exp2,v
retrieving revision 1.4
diff -u -u -r1.4 completion.exp2
--- debugger/completion.exp2	26 Mar 2002 09:45:54 -0000	1.4
+++ debugger/completion.exp2	14 Apr 2002 08:46:22 -0000
@@ -5,23 +5,24 @@
 mdb> register --quiet
 register --quiet
 mdb> 
-?                  down               maxdepth           return
-P                  e                  mindepth           s
-alias              echo               mmc_options        save
-all_regs           enable             modules            scope
-b                  exception          next               scroll
-break              excp               nondet_stack       set
-browse             f                  p                  source
-c                  finish             print              stack
-cc_query           forward            print_optionals    stack_regs
-context            g                  printlevel         step
-continue           goto               proc_stats         table_io
-current            h                  procedures         unalias
-d                  help               query              up
-delete             ignore             quit               v
-disable            io_query           r                  vars
-document           label_stats        register           view
-document_category  level              retry              
+?                  document_category  maxdepth           return
+P                  down               mindepth           s
+alias              e                  mmc_options        save
+all_regs           echo               modules            scope
+b                  enable             next               scroll
+break              exception          nondet_stack       set
+browse             excp               p                  source
+c                  f                  print              stack
+cc_query           finish             print_optionals    stack_regs
+context            forward            printlevel         step
+continue           g                  proc_body          table_io
+current            goto               proc_stats         unalias
+d                  h                  procedures         up
+dd                 help               query              v
+dd_dd              ignore             quit               vars
+delete             io_query           r                  view
+disable            label_stats        register           
+document           level              retry              
 mdb> h
 h     help  
 mdb> help v
@@ -43,7 +44,7 @@
 stack --detailed 
    0       1       1    1 pred completion:main/2-0 (det) (completion.m:13) (empty)
 mdb> proc
-proc_stats  procedures  
+proc_body   proc_stats  procedures  
 mdb> procedures complet
 completion            completion:sub2       
 completion:sub1       completion:sub2:sub3  
@@ -91,8 +92,9 @@
 b completion:sub2:sub3:zabc3 
  3: + stop  interface func completion:sub2:sub3:zabc3/0-0 (det)
 mdb> 2d
-2d                  2disable            2document_category
-2delete             2document           2down
+2d                  2delete             2document_category
+2dd                 2disable            2down
+2dd_dd              2document           
 mdb> 2delete 
 2delete 
  2: E stop  interface func completion:sub1:z1/0-0 (det)
Index: debugger/completion.exp4
===================================================================
RCS file: debugger/completion.exp4
diff -N debugger/completion.exp4
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ debugger/completion.exp4	14 Apr 2002 08:35:30 -0000
@@ -0,0 +1,78 @@
+       1:      1  1 CALL pred completion:main/2-0 (det) completion.m:13
+mdb> echo on
+Command echo enabled.
+mdb> register --quiet
+mdb> 
+?                  down               maxdepth           retry
+P                  e                  mindepth           return
+alias              echo               mmc_options        s
+all_regs           enable             modules            save
+b                  exception          next               scope
+break              excp               nondet_stack       scroll
+browse             f                  p                  set
+c                  finish             print              source
+cc_query           forward            print_optionals    stack
+context            g                  printlevel         stack_regs
+continue           goto               proc_body          step
+current            h                  proc_stats         table_io
+d                  help               procedures         unalias
+delete             ignore             query              up
+disable            io_query           quit               v
+document           label_stats        r                  vars
+document_category  level              register           view
+h     help  
+vars  view  
+help vars 
+vars
+     Prints the names of all the known variables in the current
+     environment, together with an ordinal number for each variable.
+mdb> 
+*           --pretty    -f          -v          exception   
+--flat      --verbose   -p          HeadVar__1  goal        
+p --flat HeadVar__1 
+       HeadVar__1             	state('<<c_pointer>>')
+mdb> 
+stack       stack_regs  
+stack --detailed 
+   0       1       1    1 pred completion:main/2-0 (det) (completion.m:13) (empty)
+mdb> 
+proc_body   proc_stats  procedures  
+completion            completion:sub2       
+completion:sub1       completion:sub2:sub3  
+completion:sub1       completion:sub2       completion:sub2:sub3
+procedures completion:sub1
+List of procedures in module `completion:sub1'
+pred completion:sub1:zp/1-0 (det)
+func completion:sub1:z1/0-0 (det)
+mdb> set --flat format pretty 
+mdb> unalias excp 
+Alias `excp' removed.
+mdb> b zabc3 
+ 0: + stop  interface func completion:sub2:sub3:zabc3/0-0 (det)
+mdb> 
+func*completion:            func*completion:sub2:
+func*completion:sub1:       func*completion:sub2:sub3:
+func*completion:z   func*completion:zz  
+b func*completion:z
+ 1: + stop  interface func completion:z/0-0 (det)
+mdb> 
+completion:            completion:sub2:       
+completion:sub1:       completion:sub2:sub3:  
+completion:sub1:       completion:sub2:       completion:sub2:sub3:
+completion:sub1:z1  completion:sub1:zp  
+b completion:sub1:z1
+ 2: + stop  interface func completion:sub1:z1/0-0 (det)
+mdb> 
+completion:            completion:sub2:       
+completion:sub1:       completion:sub2:sub3:  
+completion:sub1:       completion:sub2:       completion:sub2:sub3:
+completion:sub2:       completion:sub2:sub3:  
+b completion:sub2:sub3:zabc3 
+ 3: + stop  interface func completion:sub2:sub3:zabc3/0-0 (det)
+mdb> 
+2d                  2disable            2document_category
+2delete             2document           2down
+2delete 
+ 2: E stop  interface func completion:sub1:z1/0-0 (det)
+mdb> c
+ok
Index: debugger/completion.exp5
===================================================================
RCS file: debugger/completion.exp5
diff -N debugger/completion.exp5
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ debugger/completion.exp5	14 Apr 2002 08:48:02 -0000
@@ -0,0 +1,101 @@
+       1:      1  1 CALL pred completion:main/2-0 (det) completion.m:13
+mdb> echo on
+echo on
+Command echo enabled.
+mdb> register --quiet
+register --quiet
+mdb> 
+?                  down               maxdepth           retry
+P                  e                  mindepth           return
+alias              echo               mmc_options        s
+all_regs           enable             modules            save
+b                  exception          next               scope
+break              excp               nondet_stack       scroll
+browse             f                  p                  set
+c                  finish             print              source
+cc_query           forward            print_optionals    stack
+context            g                  printlevel         stack_regs
+continue           goto               proc_body          step
+current            h                  proc_stats         table_io
+d                  help               procedures         unalias
+delete             ignore             query              up
+disable            io_query           quit               v
+document           label_stats        r                  vars
+document_category  level              register           view
+mdb> h
+h     help  
+mdb> help v
+vars  view  
+mdb> help vars 
+help vars 
+vars
+     Prints the names of all the known variables in the current
+     environment, together with an ordinal number for each variable.
+mdb> p --flat 
+*           --pretty    -f          -v          exception   
+--flat      --verbose   -p          HeadVar__1  goal        
+mdb> p --flat HeadVar__1 
+p --flat HeadVar__1 
+       HeadVar__1             	state('<<c_pointer>>')
+mdb> sta
+stack       stack_regs  
+mdb> stack --detailed 
+stack --detailed 
+   0       1       1    1 pred completion:main/2-0 (det) (completion.m:13) (empty)
+mdb> proc
+proc_body   proc_stats  procedures  
+mdb> procedures complet
+completion            completion:sub2       
+completion:sub1       completion:sub2:sub3  
+mdb> procedures completion:
+completion:sub1       completion:sub2       completion:sub2:sub3
+mdb> procedures completion:sub1
+procedures completion:sub1
+List of procedures in module `completion:sub1'
+pred completion:sub1:zp/1-0 (det)
+func completion:sub1:z1/0-0 (det)
+mdb> set --flat format pretty 
+set --flat format pretty 
+mdb> unalias excp 
+unalias excp 
+Alias `excp' removed.
+mdb> b zabc3 
+b zabc3 
+ 0: + stop  interface func completion:sub2:sub3:zabc3/0-0 (det)
+mdb> b func*complet
+func*completion:            func*completion:sub2:
+func*completion:sub1:       func*completion:sub2:sub3:
+mdb> b func*completion:z
+func*completion:z   func*completion:zz  
+mdb> b func*completion:z
+b func*completion:z
+ 1: + stop  interface func completion:z/0-0 (det)
+mdb> b complet
+completion:            completion:sub2:       
+completion:sub1:       completion:sub2:sub3:  
+mdb> b completion:s
+completion:sub1:       completion:sub2:       completion:sub2:sub3:
+mdb> b completion:sub1
+completion:sub1:z1  completion:sub1:zp  
+mdb> b completion:sub1:z1
+b completion:sub1:z1
+ 2: + stop  interface func completion:sub1:z1/0-0 (det)
+mdb> b complet
+completion:            completion:sub2:       
+completion:sub1:       completion:sub2:sub3:  
+mdb> b completion:s
+completion:sub1:       completion:sub2:       completion:sub2:sub3:
+mdb> b completion:sub2
+completion:sub2:       completion:sub2:sub3:  
+mdb> b completion:sub2:sub3:zabc3 
+b completion:sub2:sub3:zabc3 
+ 3: + stop  interface func completion:sub2:sub3:zabc3/0-0 (det)
+mdb> 2d
+2d                  2disable            2document_category
+2delete             2document           2down
+mdb> 2delete 
+2delete 
+ 2: E stop  interface func completion:sub1:z1/0-0 (det)
+mdb> c
+c
+ok
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list