Revision: 74301
          http://sourceforge.net/p/brlcad/code/74301
Author:   brlcad
Date:     2019-11-05 23:56:45 +0000 (Tue, 05 Nov 2019)
Log Message:
-----------
rename for brevity

Modified Paths:
--------------
    brlcad/trunk/regress/library.sh
    brlcad/trunk/regress/red.sh

Modified: brlcad/trunk/regress/library.sh
===================================================================
--- brlcad/trunk/regress/library.sh     2019-11-05 23:12:09 UTC (rev 74300)
+++ brlcad/trunk/regress/library.sh     2019-11-05 23:56:45 UTC (rev 74301)
@@ -108,22 +108,22 @@
 
 
 ###
-# should_be_different file1 file2
+# files_differ file1 file2
 #
 # comparison function returns success (zero) if the two specified
-# files differ or either doesn't exist, error otherwise.  Increments
-# STATUS global.
-should_be_different ( ) {
+# files differ or either doesn't exist, returns error otherwise.
+# Increments STATUS global.
+files_differ ( ) {
     if test $# -ne 2 ; then
-       log "INTERNAL ERROR: should_be_different has wrong arg count ($# -ne 2)"
+       log "INTERNAL ERROR: files_differ has wrong arg count ($# -ne 2)"
        exit 1
     fi
     if test "x$2" = "x" ; then
-       log "INTERNAL ERROR: should_be_different is missing filename #2"
+       log "INTERNAL ERROR: files_differ is missing filename #2"
        exit 1
     fi
     if test "x$1" = "x" ; then
-       log "INTERNAL ERROR: should_be_different is missing filename #1"
+       log "INTERNAL ERROR: files_differ is missing filename #1"
        exit 1
     fi
 
@@ -148,21 +148,22 @@
 
 
 ###
-# should_be_same file1 file2
+# files_match file1 file2
 #
-# comparison function returns true if two specified files both exist
-# and are the same, false otherwise.  Increments STATUS global.
-should_be_same ( ) {
+# comparison function returns success (zero) if two specified files
+# both exist and have the same contents, returns failure otherwise.
+# Increments STATUS global.
+files_match ( ) {
     if test $# -ne 2 ; then
-       log "INTERNAL ERROR: should_be_same has wrong arg count ($# -ne 2)"
+       log "INTERNAL ERROR: files_match has wrong arg count ($# -ne 2)"
        exit 1
     fi
     if test "x$2" = "x" ; then
-       log "INTERNAL ERROR: should_be_same is missing filename #2"
+       log "INTERNAL ERROR: files_match is missing filename #2"
        exit 1
     fi
     if test "x$1" = "x" ; then
-       log "INTERNAL ERROR: should_be_same is missing filename #1"
+       log "INTERNAL ERROR: files_match is missing filename #1"
        exit 1
     fi
 

Modified: brlcad/trunk/regress/red.sh
===================================================================
--- brlcad/trunk/regress/red.sh 2019-11-05 23:12:09 UTC (rev 74300)
+++ brlcad/trunk/regress/red.sh 2019-11-05 23:56:45 UTC (rev 74301)
@@ -170,10 +170,10 @@
 dump sph.r $SAMPLE
 ELPMAS=red.hps.r.out
 dump hps.r $ELPMAS
-should_be_different $SAMPLE $ELPMAS
+files_differ $SAMPLE $ELPMAS
 MATRIX=red.sph_rot.c.out
 dump sph_rot.c $MATRIX
-should_be_different $SAMPLE $MATRIX
+files_differ $SAMPLE $MATRIX
 
 ########
 # nada #
@@ -183,7 +183,7 @@
 cat $SAMPLE | sed 's/  / /g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 
 ##########
 # region #
@@ -193,43 +193,43 @@
 cat $SAMPLE | sed 's/region[^_].*=.*/region = yes/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new # was already a region
+files_match $SAMPLE $REDFILE.new # was already a region
 
 init "Changing region to 1" red.region.one.out
 cat $SAMPLE | sed 's/region[^_].*=.*/region = 1/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new # was already a region
+files_match $SAMPLE $REDFILE.new # was already a region
 
 init "Changing region to empty" red.region.empty.out
 cat $SAMPLE | sed 's/region[^_].*=.*/region =/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 
 init "Changing region to no" red.region.no.out
 cat $SAMPLE | sed 's/region[^_].*=.*/region = no/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 
 init "Changing region to 0" red.region.zero.out
 cat $SAMPLE | sed 's/region[^_].*=.*/region = 0/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 
 # check for rev 50521 fix
 init "Editing region combination (-r50521)" red.region.edit-comb.out
 cat $SAMPLE  > $REDFILE
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 cat $REDFILE.new > $REDFILE.test
 echo " u sph2" >> $REDFILE.test
-should_be_different $SAMPLE $REDFILE.test
+files_differ $SAMPLE $REDFILE.test
 cat $REDFILE.test | sed 's/u sph2/ /g' > $REDFILE.test2
 dump sph.r $REDFILE.test2
-should_be_same $SAMPLE $REDFILE.test2
+files_match $SAMPLE $REDFILE.test2
 
 #############
 # region_id #
@@ -239,23 +239,23 @@
 cat $SAMPLE | sed 's/region_id.*=.*/region_id = 2000/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/2000/1000/g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing region_id to empty" red.region_id.empty.out
 cat $SAMPLE | sed 's/region_id.*=.*/region_id =/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 
 init "Changing region_id to unsafe" red.region_id.unsafe.out
 cat $SAMPLE | sed 's/region_id.*=.*/region_id = -1000/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/-1000/1000/g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 ###############
 # material_id #
@@ -265,23 +265,23 @@
 cat $SAMPLE | sed 's/material_id.*=.*/material_id = 2/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/2/1/g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing material ID to empty" red.material_id.empty.out
 cat $SAMPLE | sed 's/material_id.*=.*/material_id =/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 
 init "Changing material ID to unsafe" red.material_id.unsafe.out
 cat $SAMPLE | sed 's/material_id.*=.*/material_id = -1/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/-1/1/g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 #######
 # los #
@@ -291,23 +291,23 @@
 cat $SAMPLE | sed 's/los.*=.*/los = 50/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/50/100/g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing los to empty" red.los.empty.out
 cat $SAMPLE | sed 's/los.*=.*/los =/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 
 init "Changing los to unsafe" red.los.unsafe.out
 cat $SAMPLE | sed 's/los.*=.*/los = 200/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/200/100/g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 #######
 # air #
@@ -317,23 +317,23 @@
 cat $SAMPLE | sed 's/air.*=.*/air = 1111/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/1111//g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing air to empty" red.air.empty.out
 cat $SAMPLE | sed 's/air.*=.*/air =/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 
 init "Changing air to unsafe" red.air.unsafe.out
 cat $SAMPLE | sed 's/air.*=.*/air = -1/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/-1//g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 #########
 # color #
@@ -343,33 +343,33 @@
 cat $SAMPLE | sed 's/color.*=.*/color = 255\/255\/255/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/255.255.255//g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing color to safe with comma delimiter" red.color.delim.out
 cat $SAMPLE | sed 's/color.*=.*/color = 255,255,255/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/255.255.255//g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing color to empty" red.color.empty.out
 cat $SAMPLE | sed 's/color.*=.*/color = /g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 cat $SAMPLE | sed 's/color.*=.*/color =/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 
 init "Changing color to unsafe" red.color.unsafe.out
 cat $SAMPLE | sed 's/color.*=.*/color = -123/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 
 ##########
 # shader #
@@ -379,23 +379,23 @@
 cat $SAMPLE | sed 's/shader.*=.*/shader = plastic/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/plastic//g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing shader to empty" red.shader.empty.out
 cat $SAMPLE | sed 's/shader.*=.*/shader =/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 
 init "Changing shader to unsafe" red.shader.unsafe.out
 cat $SAMPLE | sed 's/shader.*=.*/shader = 1234567890/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/1234567890//g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 ########
 # tree #
@@ -405,21 +405,21 @@
 cat $SAMPLE | sed 's/u sph.c/u sph/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/u sph/u sph.c/g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing combination tree to empty" red.tree.empty.out
 cat $SAMPLE | sed 's/u sph.c//g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 
 init "Changing combination tree to safe" red.tree.unsafe.out
 cat $SAMPLE | sed 's/u sph.c/i like pancakes/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new # edit should fail
+files_match $SAMPLE $REDFILE.new # edit should fail
 
 ########
 # name #
@@ -429,36 +429,36 @@
 cat $SAMPLE | sed 's/sph.r/sph_new.r/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 dump sph_new.r $REDFILE.new
-should_be_same $REDFILE $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_match $REDFILE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/sph_new.r/sph.r/g' > $REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing name to safe name with extra edit" red.name.safe.out
 cat $SAMPLE | sed 's/sph.r/sph_new.r/g' | sed 's/1000/2000/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 dump sph_new.r $REDFILE.new
-should_be_different $SAMPLE $REDFILE.new
+files_differ $SAMPLE $REDFILE.new
 cat $REDFILE.new | sed 's/sph_new.r/sph.r/g' | sed 's/2000/1000/g' > 
$REDFILE.test
-should_be_same $SAMPLE $REDFILE.test
+files_match $SAMPLE $REDFILE.test
 
 init "Changing name to empty name" red.name.empty.out
 cat $SAMPLE | sed 's/sph.r//g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $REDFILE $REDFILE.new
-should_be_same $SAMPLE $REDFILE.new
+files_differ $REDFILE $REDFILE.new
+files_match $SAMPLE $REDFILE.new
 
 init "Changing name to empty name with extra edit" red.name.emptyedit.out
 cat $SAMPLE | sed 's/sph.r//g' | sed 's/1000/2000/g' > $REDFILE
 assert_different
 edit_and_dump sph.r $REDFILE.new
-should_be_different $REDFILE $REDFILE.new # empty name
-should_be_same $SAMPLE $REDFILE.new
+files_differ $REDFILE $REDFILE.new # empty name
+files_match $SAMPLE $REDFILE.new
 
 init "Changing name to unsafe name" red.name.unsafe.out
 cat $SAMPLE | sed 's/sph.r/hps.r/g' > $REDFILE
@@ -465,9 +465,9 @@
 assert_different
 edit_and_dump sph.r $REDFILE.new
 dump hps.r $REDFILE.test
-should_be_same $SAMPLE $REDFILE.new
-should_be_same $ELPMAS $REDFILE.test
-should_be_different $REDFILE.new $REDFILE.test
+files_match $SAMPLE $REDFILE.new
+files_match $ELPMAS $REDFILE.test
+files_differ $REDFILE.new $REDFILE.test
 
 init "Changing name to unsafe name with edit" red.name.unsafe.out
 cat $SAMPLE | sed 's/sph.r/hps.r/g' | sed 's/1000/2000/g' > $REDFILE
@@ -474,9 +474,9 @@
 assert_different
 edit_and_dump sph.r $REDFILE.new
 dump hps.r $REDFILE.test
-should_be_same $SAMPLE $REDFILE.new
-should_be_same $ELPMAS $REDFILE.test
-should_be_different $REDFILE.new $REDFILE.test
+files_match $SAMPLE $REDFILE.new
+files_match $ELPMAS $REDFILE.test
+files_differ $REDFILE.new $REDFILE.test
 
 ##########
 # matrix #
@@ -485,7 +485,7 @@
 cat $MATRIX | sed 's/  / /g' > $REDFILE
 assert_different
 edit_and_dump sph_rot.c $REDFILE.new
-should_be_same $MATRIX $REDFILE.new
+files_match $MATRIX $REDFILE.new
 
 
 if test $STATUS -eq 0 ; then

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to