groff-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[groff] 11/26: [refer]: Rename test artifact.


From: G. Branden Robinson
Subject: [groff] 11/26: [refer]: Rename test artifact.
Date: Sun, 15 May 2022 05:07:53 -0400 (EDT)

gbranden pushed a commit to branch master
in repository groff.

commit b61debaedee3703bcda07c545ee0e583aa1acb6a
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Thu May 5 17:44:11 2022 -0500

    [refer]: Rename test artifact.
    
    [refer]: Rename a test artifact; it's a bibliographic database file, not
    a refer(1) command file.
    
    * src/preproc/refer/tests/artifacts/62124.ref: Rename this...
    * src/preproc/refer/tests/artifacts/62124.bib: ...to this.
    * src/preproc/refer/refer.am (EXTRA_DIST):
    * src/preproc/refer/tests/report-correct-line-numbers.sh: Use new name.
---
 ChangeLog                                            | 11 +++++++++++
 src/preproc/refer/refer.am                           |  2 +-
 .../refer/tests/artifacts/{62124.ref => 62124.bib}   |  0
 .../refer/tests/report-correct-line-numbers.sh       | 20 ++++++++++----------
 4 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 774456e0..eaa5c695 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2022-05-05  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+       [refer]: Rename a test artifact; it's a bibliographic database
+       file, not a refer(1) command file.
+
+       * src/preproc/refer/tests/artifacts/62124.ref: Rename this...
+       * src/preproc/refer/tests/artifacts/62124.bib: ...to this.
+       * src/preproc/refer/refer.am (EXTRA_DIST):
+       * src/preproc/refer/tests/report-correct-line-numbers.sh: Use
+       new name.
+
 2022-05-05  G. Branden Robinson <g.branden.robinson@gmail.com>
 
        * src/preproc/refer/command.cpp (process_commands): Begin
diff --git a/src/preproc/refer/refer.am b/src/preproc/refer/refer.am
index a1d60f28..273f3349 100644
--- a/src/preproc/refer/refer.am
+++ b/src/preproc/refer/refer.am
@@ -51,7 +51,7 @@ refer_TESTS = \
 TESTS += $(refer_TESTS)
 EXTRA_DIST += \
   $(refer_TESTS) \
-  src/preproc/refer/tests/artifacts/62124.ref
+  src/preproc/refer/tests/artifacts/62124.bib
 
 
 # Local Variables:
diff --git a/src/preproc/refer/tests/artifacts/62124.ref 
b/src/preproc/refer/tests/artifacts/62124.bib
similarity index 100%
rename from src/preproc/refer/tests/artifacts/62124.ref
rename to src/preproc/refer/tests/artifacts/62124.bib
diff --git a/src/preproc/refer/tests/report-correct-line-numbers.sh 
b/src/preproc/refer/tests/report-correct-line-numbers.sh
index c5ff7a08..19cae53a 100755
--- a/src/preproc/refer/tests/report-correct-line-numbers.sh
+++ b/src/preproc/refer/tests/report-correct-line-numbers.sh
@@ -48,17 +48,17 @@ test -z "$artifact_dir" && exit 77 # skip
 
 input=".
 .R1
-bibliography $artifact_dir/62124.ref
+bibliography $artifact_dir/62124.bib
 cattywumpus
 .R2
 .
 .R1
-bibliography $artifact_dir/62124.ref
+bibliography $artifact_dir/62124.bib
 cattywumpus
 .R2"
 
 # We want standard error _only_.
-output=$(echo "$input" | "$refer" -e -p "$artifact_dir"/62124.ref \
+output=$(echo "$input" | "$refer" -e -p "$artifact_dir"/62124.bib \
     2>&1 >/dev/null)
 
 # We should get every complaint about the bibliography twice because it
@@ -70,27 +70,27 @@ output=$(echo "$input" | "$refer" -e -p 
"$artifact_dir"/62124.ref \
 # text hasn't changed before assuming a deeper logic problem.
 
 echo "checking line number of invalid character on bibliography line 1"
-count=$(echo "$output" | grep -c "refer:.*/62124.ref:1:.*code 129")
+count=$(echo "$output" | grep -c "refer:.*/62124.bib:1:.*code 129")
 test $count -eq 2 || wail
 
 echo "checking line number of first invalid character on bibliography" \
   "line 2"
-count=$(echo "$output" | grep -c "refer:.*/62124.ref:2:.*code 136")
+count=$(echo "$output" | grep -c "refer:.*/62124.bib:2:.*code 136")
 test $count -eq 2 || wail
 
 echo "checking line number of second invalid character on" \
   "bibliography line 2"
-count=$(echo "$output" | grep -c "refer:.*/62124.ref:2:.*code 137")
+count=$(echo "$output" | grep -c "refer:.*/62124.bib:2:.*code 137")
 test $count -eq 2 || wail
 
 echo "checking line number of first invalid character on" \
   "bibliography line 3"
-count=$(echo "$output" | grep -c "refer:.*/62124.ref:3:.*code 136")
+count=$(echo "$output" | grep -c "refer:.*/62124.bib:3:.*code 136")
 test $count -eq 2 || wail
 
 echo "checking line number of second invalid character on" \
   "bibliography line 3"
-count=$(echo "$output" | grep -c "refer:.*/62124.ref:3:.*code 137")
+count=$(echo "$output" | grep -c "refer:.*/62124.bib:3:.*code 137")
 test $count -eq 2 || wail
 
 # Problems with the input file should also be accurately located.
@@ -125,11 +125,11 @@ echo "checking line number of attempt to load nonexistent 
database"
 echo "$output" | grep -q "refer:.*:2:.*can't open 'nonexistent\.bib':" \
   || wail
 
-output=$(printf '.R1\ninclude nonexistent.ref\n.R2\n' | "$refer" 2>&1 \
+output=$(printf '.R1\ninclude nonexistent.bib\n.R2\n' | "$refer" 2>&1 \
   >/dev/null)
 
 echo "checking line number of attempt to load nonexistent inclusion"
-echo "$output" | grep -q "refer:.*:2:.*can't open 'nonexistent\.ref':" \
+echo "$output" | grep -q "refer:.*:2:.*can't open 'nonexistent\.bib':" \
   || wail
 test -z "$fail" || exit 1
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]