On 2019-01-12 14:49, megane wrote:
> Here's a modified patch that does these two things.

Thanks, here's a sign-off (also updated to work on Windows) as well as
the first patch again so they can be applied in sequence.

> It occurred to me that perhaps redact-gensyms shouldn't use XXX as the
> replacement as that's used in comments in the codebase. It could make
> grepping for XXXs a bit painful.

Perhaps, but let's not worry about that right now; `git grep XXX *.scm`
is fine for the meantime.

Cheers,

Evan
>From 18e468270b5a25f8bd79fd88b7046fb5b74ca6c6 Mon Sep 17 00:00:00 2001
From: megane <megan...@gmail.com>
Date: Mon, 19 Nov 2018 10:01:33 +0200
Subject: [PATCH 1/2] Add new test for scrutinizer message formatting

This new test covers most, but not all, scrutinizer messages.

In the test scripts, scrutiny-tests-2.scm has been moved up so that all
output is generated before diffing anything.

Signed-off-by: Evan Hanson <ev...@foldling.org>
---
 distribution/manifest                     |   2 +
 tests/runtests.bat                        |  10 +-
 tests/runtests.sh                         |   6 +-
 tests/scrutinizer-message-format.expected | 238 ++++++++++++++++++++++++++++++
 tests/test-scrutinizer-message-format.scm |  77 ++++++++++
 5 files changed, 329 insertions(+), 4 deletions(-)
 create mode 100644 tests/scrutinizer-message-format.expected
 create mode 100644 tests/test-scrutinizer-message-format.scm

diff --git a/distribution/manifest b/distribution/manifest
index 9c1dcfdb..c1a615ea 100644
--- a/distribution/manifest
+++ b/distribution/manifest
@@ -176,6 +176,8 @@ tests/scrutiny-tests-2.scm
 tests/scrutiny-tests-3.scm
 tests/scrutiny.expected
 tests/scrutiny-2.expected
+tests/test-scrutinizer-message-format.scm
+tests/scrutinizer-message-format.expected
 tests/syntax-rule-stress-test.scm
 tests/syntax-tests.scm
 tests/syntax-tests-2.scm
diff --git a/tests/runtests.bat b/tests/runtests.bat
index f739a297..47d80c0c 100644
--- a/tests/runtests.bat
+++ b/tests/runtests.bat
@@ -92,19 +92,25 @@ echo ======================================== scrutiny tests ...
 if errorlevel 1 exit /b 1
 a.out
 if errorlevel 1 exit /b 1
+
 %compile% scrutiny-tests.scm -A -verbose 2>scrutiny.out
 if errorlevel 1 exit /b 1
 
 rem this is sensitive to gensym-names, so make it optional
 if not exist scrutiny.expected copy /Y scrutiny.out scrutiny.expected
 
-fc /lb%FCBUFSIZE% /w scrutiny.expected scrutiny.out
+%compile% scrutiny-tests-2.scm -A -verbose 2>scrutiny-2.out
 if errorlevel 1 exit /b 1
+%compile% test-scrutinizer-message-format.scm -A -verbose 2>scrutinizer-message-format.out
+rem this is expected to fail, so no errorlevel check
 
-%compile% scrutiny-tests-2.scm -A -verbose 2>scrutiny-2.out
+fc /lb%FCBUFSIZE% /w scrutinizer-message-format.expected scrutinizer-message-format.out
+if errorlevel 1 exit /b 1
+fc /lb%FCBUFSIZE% /w scrutiny.expected scrutiny.out
 if errorlevel 1 exit /b 1
 
 if not exist scrutiny-2.expected copy /Y scrutiny-2.out scrutiny-2.expected
+
 fc /lb%FCBUFSIZE% /w scrutiny-2.expected scrutiny-2.out
 if errorlevel 1 exit /b 1
 
diff --git a/tests/runtests.sh b/tests/runtests.sh
index 6da7630d..c6f9252e 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -123,11 +123,13 @@ if test \! -f specialization.expected; then
     cp specialization.expected specialization.out
 fi
 
+$compile scrutiny-tests-2.scm -A -verbose 2>scrutiny-2.out
+$compile test-scrutinizer-message-format.scm -A -verbose 2>scrutinizer-message-format.out || true
+
+diff $DIFF_OPTS scrutinizer-message-format.expected scrutinizer-message-format.out
 diff $DIFF_OPTS scrutiny.expected scrutiny.out
 diff $DIFF_OPTS specialization.expected specialization.out
 
-$compile scrutiny-tests-2.scm -A 2>scrutiny-2.out -verbose
-
 # this is sensitive to gensym-names, so make it optional
 if test \! -f scrutiny-2.expected; then
     cp scrutiny-2.expected scrutiny-2.out
diff --git a/tests/scrutinizer-message-format.expected b/tests/scrutinizer-message-format.expected
new file mode 100644
index 00000000..9c7299f7
--- /dev/null
+++ b/tests/scrutinizer-message-format.expected
@@ -0,0 +1,238 @@
+
+Warning: literal in operator position: (1 2)
+
+Warning: literal in operator position: (1 2)
+
+Warning: in toplevel procedure `r-proc-call-argument-count-mismatch':
+  (test-scrutinizer-message-format.scm:9) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument
+
+Warning: in toplevel procedure `r-proc-call-argument-type-mismatch':
+  (test-scrutinizer-message-format.scm:10) in procedure call to `scheme#length', expected argument #1 of type `list' but was given an argument of type `symbol'
+
+Warning: in toplevel procedure `r-proc-call-argument-value-count':
+  (test-scrutinizer-message-format.scm:11) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results
+
+Warning: in toplevel procedure `r-proc-call-argument-value-count':
+  (test-scrutinizer-message-format.scm:11) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results
+
+Warning: in toplevel procedure `r-proc-call-argument-value-count':
+  expected a single result in `let' binding of `g28', but received zero results
+
+Warning: in toplevel procedure `r-cond-branch-value-count-mismatch':
+  branches in conditional expression differ in the number of results:
+
+(if (the * 1) 1 (scheme#values 1 2))
+
+Warning: in toplevel procedure `r-invalid-called-procedure-type':
+  in procedure call to `1', expected a value of type `(procedure (*) *)' but was given a value of type `fixnum'
+
+Note: in toplevel procedure `r-pred-call-always-true':
+  (test-scrutinizer-message-format.scm:14) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
+
+Note: in toplevel procedure `r-pred-call-always-false':
+  (test-scrutinizer-message-format.scm:15) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false
+
+Note: in toplevel procedure `r-cond-test-always-true':
+  expected a value of type boolean in conditional, but was given a value of type `symbol' which is always true:
+
+(if 'symbol 1 (##core#undefined))
+
+Note: in toplevel procedure `r-cond-test-always-false':
+  in conditional, test expression will always return false:
+
+(if #f 1 (##core#undefined))
+
+Note: in toplevel procedure `r-type-mismatch-in-the':
+  expression returns a result of type `fixnum' but is declared to return `symbol', which is not compatible
+
+Warning: in toplevel procedure `r-zero-values-for-the':
+  expression returns zero values but is declared to have a single result of type `symbol'
+
+Warning: in toplevel procedure `r-too-many-values-for-the':
+  expression returns 2 values but is declared to have a single result
+
+Note: in toplevel procedure `r-too-many-values-for-the':
+  expression returns a result of type `fixnum' but is declared to return `symbol', which is not compatible
+
+Warning: in toplevel procedure `r-toplevel-var-assignment-type-mismatch':
+  assignment of value of type `fixnum' to toplevel variable `foo' does not match declared type `boolean'
+
+Warning: in toplevel procedure `r-deprecated-identifier':
+  use of deprecated `deprecated-foo'
+
+Warning: in toplevel procedure `r-deprecated-identifier':
+  use of deprecated `deprecated-foo2' - consider `foo'
+
+Warning: at toplevel:
+  assignment of value of type `fixnum' to toplevel variable `foo' does not match declared type `boolean'
+
+Warning: in toplevel procedure `list-ref-negative-index':
+  (test-scrutinizer-message-format.scm:26) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
+
+Warning: in toplevel procedure `list-ref-out-of-range':
+  (test-scrutinizer-message-format.scm:27) in procedure call to `scheme#list-ref', index 1 out of range for proper list of length 0
+
+Warning: in toplevel procedure `vector-ref-out-of-range':
+  (test-scrutinizer-message-format.scm:29) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 0
+
+Warning: in toplevel procedure `zero-values-for-let':
+  expected a single result in `let' binding of `a', but received zero results
+
+Warning: in toplevel procedure `multiple-values-for-let':
+  expected a single result in `let' binding of `a', but received 2 results
+
+Warning: in toplevel procedure `zero-values-for-conditional':
+  expected a single result in conditional, but received zero results
+
+Warning: in toplevel procedure `multiple-values-for-conditional':
+  expected a single result in conditional, but received 2 results
+
+Note: in toplevel procedure `multiple-values-for-conditional':
+  (test-scrutinizer-message-format.scm:33) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
+
+(if (scheme#values 1 2) 1 (##core#undefined))
+
+Warning: in local procedure `r-proc-call-argument-count-mismatch',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:52) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument
+
+Warning: in local procedure `r-proc-call-argument-type-mismatch',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:53) in procedure call to `scheme#length', expected argument #1 of type `list' but was given an argument of type `symbol'
+
+Warning: in local procedure `r-proc-call-argument-value-count',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:54) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results
+
+Warning: in local procedure `r-proc-call-argument-value-count',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:54) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results
+
+Warning: in local procedure `r-proc-call-argument-value-count',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expected a single result in `let' binding of `g90', but received zero results
+
+Warning: in local procedure `r-cond-branch-value-count-mismatch',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  branches in conditional expression differ in the number of results:
+
+(if (the * 1) 1 (chicken.time#cpu-time))
+
+Warning: in local procedure `r-invalid-called-procedure-type',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  in procedure call to `1', expected a value of type `(procedure (*) *)' but was given a value of type `fixnum'
+
+Note: in local procedure `r-pred-call-always-true',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:57) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
+
+Note: in local procedure `r-pred-call-always-false',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:58) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false
+
+Note: in local procedure `r-cond-test-always-true',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:59) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
+
+(if (scheme#length '()) 1 (##core#undefined))
+
+Note: in local procedure `r-cond-test-always-false',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  in conditional, test expression will always return false:
+
+(if #f 1 (##core#undefined))
+
+Note: in local procedure `r-type-mismatch-in-the',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expression returns a result of type `fixnum' but is declared to return `symbol', which is not compatible
+
+Warning: in local procedure `r-zero-values-for-the',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expression returns zero values but is declared to have a single result of type `symbol'
+
+Warning: in local procedure `r-too-many-values-for-the',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expression returns 2 values but is declared to have a single result
+
+Note: in local procedure `r-too-many-values-for-the',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expression returns a result of type `fixnum' but is declared to return `symbol', which is not compatible
+
+Warning: in local procedure `r-toplevel-var-assignment-type-mismatch',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  assignment of value of type `fixnum' to toplevel variable `m#foo2' does not match declared type `boolean'
+
+Warning: in local procedure `r-deprecated-identifier',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  use of deprecated `m#deprecated-foo'
+
+Warning: in local procedure `r-deprecated-identifier',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  use of deprecated `m#deprecated-foo2' - consider `foo'
+
+Warning: in local procedure `list-ref-negative-index',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:67) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
+
+Warning: in local procedure `list-ref-out-of-range',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:68) in procedure call to `scheme#list-ref', index 1 out of range for proper list of length 0
+
+Warning: in local procedure `vector-ref-out-of-range',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:70) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 0
+
+Warning: in local procedure `zero-values-for-let',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expected a single result in `let' binding of `a', but received zero results
+
+Warning: in local procedure `multiple-values-for-let',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expected a single result in `let' binding of `a', but received 2 results
+
+Warning: in local procedure `zero-values-for-conditional',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expected a single result in conditional, but received zero results
+
+Warning: in local procedure `multiple-values-for-conditional',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  expected a single result in conditional, but received 2 results
+
+Note: in local procedure `multiple-values-for-conditional',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:74) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
+
+(if (scheme#values 1 2) 1 (##core#undefined))
+
+Error: in local procedure `fail-compiler-typecase',
+  in local procedure `local-bar',
+  in toplevel procedure `m#toplevel-foo':
+  (test-scrutinizer-message-format.scm:76) no clause applies in `compiler-typecase' for expression of type `fixnum':
+    symbol
+    list
diff --git a/tests/test-scrutinizer-message-format.scm b/tests/test-scrutinizer-message-format.scm
new file mode 100644
index 00000000..d792cf34
--- /dev/null
+++ b/tests/test-scrutinizer-message-format.scm
@@ -0,0 +1,77 @@
+(import (chicken time))
+(: deprecated-foo deprecated)
+(define deprecated-foo 1)
+(: deprecated-foo2 (deprecated foo))
+(define deprecated-foo2 2)
+(: foo boolean)
+(define foo #t)
+
+(define (r-proc-call-argument-count-mismatch) (cons '()))
+(define (r-proc-call-argument-type-mismatch) (length 'symbol))
+(define (r-proc-call-argument-value-count) (list (cpu-time)) (vector (values)) ((values)))
+(define (r-cond-branch-value-count-mismatch) (if (the * 1) 1 (values 1 2)))
+(define (r-invalid-called-procedure-type) (1 2))
+(define (r-pred-call-always-true) (list? '()))
+(define (r-pred-call-always-false) (symbol? 1))
+(define (r-cond-test-always-true) (if 'symbol 1))
+(define (r-cond-test-always-false) (if #f 1))
+(define (r-type-mismatch-in-the) (the symbol 1))
+(define (r-zero-values-for-the) (the symbol (values)))
+(define (r-too-many-values-for-the) (the symbol (values 1 2)))
+(define (r-toplevel-var-assignment-type-mismatch) (set! foo 1))
+(define (r-deprecated-identifier) (list deprecated-foo) (vector deprecated-foo2))
+
+(set! foo 1)
+
+(define (list-ref-negative-index) (list-ref '() -1))
+(define (list-ref-out-of-range) (list-ref '() 1))
+(define (append-invalid-last-arg) (scheme#append (list 1) 1)) ;; TODO: doesn't work
+(define (vector-ref-out-of-range) (vector-ref (vector) -1))
+(define (zero-values-for-let) (let ((a (values))) a))
+(define (multiple-values-for-let) (let ((a (values 1 2))) a))
+(define (zero-values-for-conditional) (if (values) 1))
+(define (multiple-values-for-conditional) (if (values 1 2) 1))
+
+;; (define (fail-compiler-typecase) (compiler-typecase 1 (symbol 1) (list 2)))
+
+(module
+ m
+ ()
+ (import scheme)
+ (import (chicken base) (chicken type) (chicken time))
+
+ (: foo2 boolean)
+ (define foo2 #t)
+ (: deprecated-foo deprecated)
+ (define deprecated-foo 1)
+ (: deprecated-foo2 (deprecated foo))
+ (define deprecated-foo2 2)
+
+ (define (toplevel-foo)
+   (define (local-bar)
+     (define (r-proc-call-argument-count-mismatch) (cons '()))
+     (define (r-proc-call-argument-type-mismatch) (length 'symbol))
+     (define (r-proc-call-argument-value-count) (list (cpu-time)) (vector (values)) ((values)))
+     (define (r-cond-branch-value-count-mismatch) (if (the * 1) 1 (cpu-time)))
+     (define (r-invalid-called-procedure-type) (1 2))
+     (define (r-pred-call-always-true) (list? '()))
+     (define (r-pred-call-always-false) (symbol? 1))
+     (define (r-cond-test-always-true) (if (length '()) 1))
+     (define (r-cond-test-always-false) (if #f 1))
+     (define (r-type-mismatch-in-the) (the symbol 1))
+     (define (r-zero-values-for-the) (the symbol (values)))
+     (define (r-too-many-values-for-the) (the symbol (values 1 2)))
+     (define (r-toplevel-var-assignment-type-mismatch) (set! foo2 1))
+     (define (r-deprecated-identifier) (list deprecated-foo) (vector deprecated-foo2))
+
+     (define (list-ref-negative-index) (list-ref '() -1))
+     (define (list-ref-out-of-range) (list-ref '() 1))
+     (define (append-invalid-last-arg) (scheme#append (list 1) 1)) ;; TODO: doesn't work
+     (define (vector-ref-out-of-range) (vector-ref (vector) -1))
+     (define (zero-values-for-let) (let ((a (values))) a))
+     (define (multiple-values-for-let) (let ((a (values 1 2))) a))
+     (define (zero-values-for-conditional) (if (values) 1))
+     (define (multiple-values-for-conditional) (if (values 1 2) 1))
+
+     (define (fail-compiler-typecase) (compiler-typecase 1 (symbol 1) (list 2)))
+     )))
-- 
2.11.0

>From a97db18846745fc508fd470c467fad72962584b4 Mon Sep 17 00:00:00 2001
From: megane <megan...@gmail.com>
Date: Wed, 28 Nov 2018 17:28:03 +0200
Subject: [PATCH 2/2] Sanitize gensyms from scrutinizer test outputs

Instead of skipping tests that are sensitive to gensyms altogether, try
to sanitize the output.

For scrutinizer-message-format.scm, sanitize a and b because they are
used in typevars. These are removed once the scrutinizer sanitizes
typevars in messages internally again (fix for #1563 broke this).

Also, sanitize "scm:" so line number mismatches do not cause million
diff conflicts when adding/removing stuff to/from tests.

Signed-off-by: Evan Hanson <ev...@foldling.org>
---
 distribution/manifest                     |   1 +
 tests/redact-gensyms.scm                  |  22 ++++++
 tests/runtests.bat                        |  35 +++++----
 tests/runtests.sh                         |  40 ++++------
 tests/scrutinizer-message-format.expected |  50 +++++++------
 tests/scrutiny-2.expected                 |  46 ++++++------
 tests/scrutiny.expected                   | 118 +++++++++++++++---------------
 tests/specialization.expected             |  18 +++--
 8 files changed, 181 insertions(+), 149 deletions(-)
 create mode 100644 tests/redact-gensyms.scm

diff --git a/distribution/manifest b/distribution/manifest
index c1a615ea..928d5ef1 100644
--- a/distribution/manifest
+++ b/distribution/manifest
@@ -176,6 +176,7 @@ tests/scrutiny-tests-2.scm
 tests/scrutiny-tests-3.scm
 tests/scrutiny.expected
 tests/scrutiny-2.expected
+tests/redact-gensyms.scm
 tests/test-scrutinizer-message-format.scm
 tests/scrutinizer-message-format.expected
 tests/syntax-rule-stress-test.scm
diff --git a/tests/redact-gensyms.scm b/tests/redact-gensyms.scm
new file mode 100644
index 00000000..505247be
--- /dev/null
+++ b/tests/redact-gensyms.scm
@@ -0,0 +1,22 @@
+(module redact-gensyms ()
+  (import (scheme))
+  (import (chicken base))
+  (import (chicken irregex))
+  (import (chicken type))
+  (import (only (chicken io) read-line)
+          (only (chicken process-context) command-line-arguments)
+          (only (chicken string) string-split))
+
+  (define prefixes (if (null? (command-line-arguments))
+                       '("tmp" "g" "scm:")
+                       (string-split (car (command-line-arguments)) ",")))
+
+  (let ((rege (irregex `(: bow ($ (or ,@prefixes)) (+ numeric)))))
+    (print ";; numbers replaced with XXX by redact-gensyms.scm")
+    (print ";; prefixes: " prefixes)
+    (let lp ()
+      (let ((l (read-line)))
+        (if (not (eof-object? l))
+            (begin
+              (print (irregex-replace/all rege l 1 "XXX"))
+              (lp)))))))
diff --git a/tests/runtests.bat b/tests/runtests.bat
index 47d80c0c..49fa8348 100644
--- a/tests/runtests.bat
+++ b/tests/runtests.bat
@@ -93,25 +93,34 @@ if errorlevel 1 exit /b 1
 a.out
 if errorlevel 1 exit /b 1
 
-%compile% scrutiny-tests.scm -A -verbose 2>scrutiny.out
+%compile% test-scrutinizer-message-format.scm -A 2>scrutinizer-message-format.out
+rem this is expected to fail, so no errorlevel check
+%compile% scrutiny-tests.scm -A 2>scrutiny.out
 if errorlevel 1 exit /b 1
-
-rem this is sensitive to gensym-names, so make it optional
-if not exist scrutiny.expected copy /Y scrutiny.out scrutiny.expected
-
-%compile% scrutiny-tests-2.scm -A -verbose 2>scrutiny-2.out
+%compile% scrutiny-tests-2.scm -A 2>scrutiny-2.out
+if errorlevel 1 exit /b 1
+%compile% specialization-tests.scm -A -specialize 2>specialization.out
 if errorlevel 1 exit /b 1
-%compile% test-scrutinizer-message-format.scm -A -verbose 2>scrutinizer-message-format.out
-rem this is expected to fail, so no errorlevel check
 
-fc /lb%FCBUFSIZE% /w scrutinizer-message-format.expected scrutinizer-message-format.out
+rem Replace foo123 -> fooXX so gensyms don't trigger failures
+%compile% redact-gensyms.scm -o redact-gensyms
 if errorlevel 1 exit /b 1
-fc /lb%FCBUFSIZE% /w scrutiny.expected scrutiny.out
+redact-gensyms "tmp,g,scm:,a,b" < scrutinizer-message-format.out > scrutinizer-message-format.redacted
+if errorlevel 1 exit /b 1
+redact-gensyms < scrutiny-2.out > scrutiny-2.redacted
+if errorlevel 1 exit /b 1
+redact-gensyms < scrutiny.out > scrutiny.redacted
+if errorlevel 1 exit /b 1
+redact-gensyms < specialization.out > specialization.redacted
 if errorlevel 1 exit /b 1
 
-if not exist scrutiny-2.expected copy /Y scrutiny-2.out scrutiny-2.expected
-
-fc /lb%FCBUFSIZE% /w scrutiny-2.expected scrutiny-2.out
+fc /lb%FCBUFSIZE% /w scrutinizer-message-format.expected scrutinizer-message-format.redacted
+if errorlevel 1 exit /b 1
+fc /lb%FCBUFSIZE% /w scrutiny.expected scrutiny.redacted
+if errorlevel 1 exit /b 1
+fc /lb%FCBUFSIZE% /w scrutiny-2.expected scrutiny-2.redacted
+if errorlevel 1 exit /b 1
+fc /lb%FCBUFSIZE% /w specialization.expected specialization.redacted
 if errorlevel 1 exit /b 1
 
 %compile% scrutiny-tests-3.scm -specialize -block
diff --git a/tests/runtests.sh b/tests/runtests.sh
index c6f9252e..bd8063c9 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -112,30 +112,22 @@ $compile scrutinizer-tests.scm -analyze-only
 $compile typematch-tests.scm -specialize -no-warnings
 ./a.out
 
-$compile scrutiny-tests.scm -analyze-only -verbose 2>scrutiny.out
-$compile specialization-tests.scm -analyze-only -verbose -specialize 2>specialization.out
-
-# these are sensitive to gensym-names, so make them optional
-if test \! -f scrutiny.expected; then
-    cp scrutiny.expected scrutiny.out
-fi
-if test \! -f specialization.expected; then
-    cp specialization.expected specialization.out
-fi
-
-$compile scrutiny-tests-2.scm -A -verbose 2>scrutiny-2.out
-$compile test-scrutinizer-message-format.scm -A -verbose 2>scrutinizer-message-format.out || true
-
-diff $DIFF_OPTS scrutinizer-message-format.expected scrutinizer-message-format.out
-diff $DIFF_OPTS scrutiny.expected scrutiny.out
-diff $DIFF_OPTS specialization.expected specialization.out
-
-# this is sensitive to gensym-names, so make it optional
-if test \! -f scrutiny-2.expected; then
-    cp scrutiny-2.expected scrutiny-2.out
-fi
-
-diff $DIFF_OPTS scrutiny-2.expected scrutiny-2.out
+$compile test-scrutinizer-message-format.scm -A 2>scrutinizer-message-format.out || true
+$compile scrutiny-tests.scm -A 2>scrutiny.out
+$compile scrutiny-tests-2.scm -A 2>scrutiny-2.out
+$compile specialization-tests.scm -A -specialize 2>specialization.out
+
+# Replace foo123 -> fooXX so gensyms don't trigger failures
+$compile redact-gensyms.scm -o redact-gensyms
+./redact-gensyms "tmp,g,scm:,a,b" < scrutinizer-message-format.out > scrutinizer-message-format.redacted
+./redact-gensyms < scrutiny-2.out > scrutiny-2.redacted
+./redact-gensyms < scrutiny.out > scrutiny.redacted
+./redact-gensyms < specialization.out > specialization.redacted
+
+diff $DIFF_OPTS scrutinizer-message-format.expected scrutinizer-message-format.redacted
+diff $DIFF_OPTS scrutiny.expected scrutiny.redacted
+diff $DIFF_OPTS scrutiny-2.expected scrutiny-2.redacted
+diff $DIFF_OPTS specialization.expected specialization.redacted
 
 $compile scrutiny-tests-3.scm -specialize -block
 ./a.out
diff --git a/tests/scrutinizer-message-format.expected b/tests/scrutinizer-message-format.expected
index 9c7299f7..4c8fcc89 100644
--- a/tests/scrutinizer-message-format.expected
+++ b/tests/scrutinizer-message-format.expected
@@ -1,22 +1,24 @@
+;; numbers replaced with XXX by redact-gensyms.scm
+;; prefixes: (tmp g scm: a b)
 
 Warning: literal in operator position: (1 2)
 
 Warning: literal in operator position: (1 2)
 
 Warning: in toplevel procedure `r-proc-call-argument-count-mismatch':
-  (test-scrutinizer-message-format.scm:9) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument
 
 Warning: in toplevel procedure `r-proc-call-argument-type-mismatch':
-  (test-scrutinizer-message-format.scm:10) in procedure call to `scheme#length', expected argument #1 of type `list' but was given an argument of type `symbol'
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#length', expected argument #1 of type `list' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `r-proc-call-argument-value-count':
-  (test-scrutinizer-message-format.scm:11) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results
+  (test-scrutinizer-message-format.scm:XXX) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results
 
 Warning: in toplevel procedure `r-proc-call-argument-value-count':
-  (test-scrutinizer-message-format.scm:11) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results
+  (test-scrutinizer-message-format.scm:XXX) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results
 
 Warning: in toplevel procedure `r-proc-call-argument-value-count':
-  expected a single result in `let' binding of `g28', but received zero results
+  expected a single result in `let' binding of `gXXX', but received zero results
 
 Warning: in toplevel procedure `r-cond-branch-value-count-mismatch':
   branches in conditional expression differ in the number of results:
@@ -27,10 +29,10 @@ Warning: in toplevel procedure `r-invalid-called-procedure-type':
   in procedure call to `1', expected a value of type `(procedure (*) *)' but was given a value of type `fixnum'
 
 Note: in toplevel procedure `r-pred-call-always-true':
-  (test-scrutinizer-message-format.scm:14) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
 
 Note: in toplevel procedure `r-pred-call-always-false':
-  (test-scrutinizer-message-format.scm:15) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: in toplevel procedure `r-cond-test-always-true':
   expected a value of type boolean in conditional, but was given a value of type `symbol' which is always true:
@@ -67,13 +69,13 @@ Warning: at toplevel:
   assignment of value of type `fixnum' to toplevel variable `foo' does not match declared type `boolean'
 
 Warning: in toplevel procedure `list-ref-negative-index':
-  (test-scrutinizer-message-format.scm:26) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
 
 Warning: in toplevel procedure `list-ref-out-of-range':
-  (test-scrutinizer-message-format.scm:27) in procedure call to `scheme#list-ref', index 1 out of range for proper list of length 0
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list-ref', index 1 out of range for proper list of length 0
 
 Warning: in toplevel procedure `vector-ref-out-of-range':
-  (test-scrutinizer-message-format.scm:29) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 0
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 0
 
 Warning: in toplevel procedure `zero-values-for-let':
   expected a single result in `let' binding of `a', but received zero results
@@ -88,34 +90,34 @@ Warning: in toplevel procedure `multiple-values-for-conditional':
   expected a single result in conditional, but received 2 results
 
 Note: in toplevel procedure `multiple-values-for-conditional':
-  (test-scrutinizer-message-format.scm:33) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
+  (test-scrutinizer-message-format.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
 
 (if (scheme#values 1 2) 1 (##core#undefined))
 
 Warning: in local procedure `r-proc-call-argument-count-mismatch',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:52) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#cons', expected 2 arguments but was given 1 argument
 
 Warning: in local procedure `r-proc-call-argument-type-mismatch',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:53) in procedure call to `scheme#length', expected argument #1 of type `list' but was given an argument of type `symbol'
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#length', expected argument #1 of type `list' but was given an argument of type `symbol'
 
 Warning: in local procedure `r-proc-call-argument-value-count',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:54) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results
+  (test-scrutinizer-message-format.scm:XXX) expected a single result in argument #1 of procedure call `(scheme#list (chicken.time#cpu-time))', but received 2 results
 
 Warning: in local procedure `r-proc-call-argument-value-count',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:54) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results
+  (test-scrutinizer-message-format.scm:XXX) expected a single result in argument #1 of procedure call `(scheme#vector (scheme#values))', but received zero results
 
 Warning: in local procedure `r-proc-call-argument-value-count',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  expected a single result in `let' binding of `g90', but received zero results
+  expected a single result in `let' binding of `gXXX', but received zero results
 
 Warning: in local procedure `r-cond-branch-value-count-mismatch',
   in local procedure `local-bar',
@@ -132,17 +134,17 @@ Warning: in local procedure `r-invalid-called-procedure-type',
 Note: in local procedure `r-pred-call-always-true',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:57) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
 
 Note: in local procedure `r-pred-call-always-false',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:58) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: in local procedure `r-cond-test-always-true',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:59) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
+  (test-scrutinizer-message-format.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
 
 (if (scheme#length '()) 1 (##core#undefined))
 
@@ -191,17 +193,17 @@ Warning: in local procedure `r-deprecated-identifier',
 Warning: in local procedure `list-ref-negative-index',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:67) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
 
 Warning: in local procedure `list-ref-out-of-range',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:68) in procedure call to `scheme#list-ref', index 1 out of range for proper list of length 0
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#list-ref', index 1 out of range for proper list of length 0
 
 Warning: in local procedure `vector-ref-out-of-range',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:70) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 0
+  (test-scrutinizer-message-format.scm:XXX) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 0
 
 Warning: in local procedure `zero-values-for-let',
   in local procedure `local-bar',
@@ -226,13 +228,13 @@ Warning: in local procedure `multiple-values-for-conditional',
 Note: in local procedure `multiple-values-for-conditional',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:74) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
+  (test-scrutinizer-message-format.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `fixnum' which is always true:
 
 (if (scheme#values 1 2) 1 (##core#undefined))
 
 Error: in local procedure `fail-compiler-typecase',
   in local procedure `local-bar',
   in toplevel procedure `m#toplevel-foo':
-  (test-scrutinizer-message-format.scm:76) no clause applies in `compiler-typecase' for expression of type `fixnum':
+  (test-scrutinizer-message-format.scm:XXX) no clause applies in `compiler-typecase' for expression of type `fixnum':
     symbol
     list
diff --git a/tests/scrutiny-2.expected b/tests/scrutiny-2.expected
index 90582764..79c7ad5b 100644
--- a/tests/scrutiny-2.expected
+++ b/tests/scrutiny-2.expected
@@ -1,66 +1,68 @@
+;; numbers replaced with XXX by redact-gensyms.scm
+;; prefixes: (tmp g scm:)
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `pair' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `pair' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `null' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `null' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `null' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `null' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `fixnum' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:20) in procedure call to `scheme#pair?', the predicate is called with an argument of type `float' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#pair?', the predicate is called with an argument of type `float' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:21) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:21) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `null' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:21) in procedure call to `scheme#list?', the predicate is called with an argument of type `fixnum' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:21) in procedure call to `scheme#list?', the predicate is called with an argument of type `float' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#list?', the predicate is called with an argument of type `float' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `null' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `null' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `null' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `null' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `pair' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `pair' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `fixnum' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:22) in procedure call to `scheme#null?', the predicate is called with an argument of type `float' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#null?', the predicate is called with an argument of type `float' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:23) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:23) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `float' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `float' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:25) in procedure call to `chicken.base#flonum?', the predicate is called with an argument of type `float' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `chicken.base#flonum?', the predicate is called with an argument of type `float' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:25) in procedure call to `chicken.base#flonum?', the predicate is called with an argument of type `fixnum' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `chicken.base#flonum?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:27) in procedure call to `scheme#number?', the predicate is called with an argument of type `fixnum' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#number?', the predicate is called with an argument of type `fixnum' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:27) in procedure call to `scheme#number?', the predicate is called with an argument of type `float' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#number?', the predicate is called with an argument of type `float' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:27) in procedure call to `scheme#number?', the predicate is called with an argument of type `number' and will always return true
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#number?', the predicate is called with an argument of type `number' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests-2.scm:27) in procedure call to `scheme#number?', the predicate is called with an argument of type `null' and will always return false
+  (scrutiny-tests-2.scm:XXX) in procedure call to `scheme#number?', the predicate is called with an argument of type `null' and will always return false
diff --git a/tests/scrutiny.expected b/tests/scrutiny.expected
index e445ebbb..0bc6a8dd 100644
--- a/tests/scrutiny.expected
+++ b/tests/scrutiny.expected
@@ -1,5 +1,7 @@
+;; numbers replaced with XXX by redact-gensyms.scm
+;; prefixes: (tmp g scm:)
 
-Warning: (scrutiny-tests.scm:31) - assignment to imported value binding `car'
+Warning: (scrutiny-tests.scm:XXX) - assignment to imported value binding `car'
 
 Note: in local procedure `c',
   in local procedure `b',
@@ -19,34 +21,34 @@ Warning: in toplevel procedure `foo':
 (if x (scheme#values 1 2) (scheme#values 1 2 (scheme#+ (scheme#+ ...))))
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:19) in procedure call to `bar', expected argument #2 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `bar', expected argument #2 of type `number' but was given an argument of type `symbol'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:21) in procedure call to `scheme#string?', expected 1 argument but was given 0 arguments
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', expected 1 argument but was given 0 arguments
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:23) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values 1 2))', but received 2 results
+  (scrutiny-tests.scm:XXX) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values 1 2))', but received 2 results
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:24) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values))', but received zero results
+  (scrutiny-tests.scm:XXX) expected a single result in argument #1 of procedure call `(chicken.base#print (scheme#values))', but received zero results
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:27) in procedure call to `x', expected a value of type `(procedure () *)' but was given a value of type `fixnum'
+  (scrutiny-tests.scm:XXX) in procedure call to `x', expected a value of type `(procedure () *)' but was given a value of type `fixnum'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:29) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `symbol'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:29) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol'
 
 Warning: at toplevel:
   assignment of value of type `fixnum' to toplevel variable `scheme#car' does not match declared type `(forall (a335) (procedure scheme#car ((pair a335 *)) a335))'
 
 Warning: at toplevel:
-  expected a single result in `let' binding of `g19', but received 2 results
+  expected a single result in `let' binding of `gXXX', but received 2 results
 
 Warning: at toplevel:
-  in procedure call to `g19', expected a value of type `(procedure () *)' but was given a value of type `fixnum'
+  in procedure call to `gXXX', expected a value of type `(procedure () *)' but was given a value of type `fixnum'
 
 Note: in toplevel procedure `foo':
   expected a value of type boolean in conditional, but was given a value of type `(procedure bar () *)' which is always true:
@@ -54,34 +56,34 @@ Note: in toplevel procedure `foo':
 (if bar 3 (##core#undefined))
 
 Warning: in toplevel procedure `foo2':
-  (scrutiny-tests.scm:58) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `number'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `number'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:66) in procedure call to `foo3', expected argument #1 of type `string' but was given an argument of type `fixnum'
+  (scrutiny-tests.scm:XXX) in procedure call to `foo3', expected argument #1 of type `string' but was given an argument of type `fixnum'
 
 Warning: in toplevel procedure `foo4':
-  (scrutiny-tests.scm:71) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: in toplevel procedure `foo5':
-  (scrutiny-tests.scm:77) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: in toplevel procedure `foo6':
-  (scrutiny-tests.scm:83) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:90) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: in toplevel procedure `foo10':
-  (scrutiny-tests.scm:104) in procedure call to `foo9', expected argument #1 of type `string' but was given an argument of type `number'
+  (scrutiny-tests.scm:XXX) in procedure call to `foo9', expected argument #1 of type `string' but was given an argument of type `number'
 
 Warning: in toplevel procedure `foo10':
-  (scrutiny-tests.scm:105) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #1 of type `number' but was given an argument of type `string'
 
 Note: in toplevel procedure `foo10':
   expression returns a result of type `string' but is declared to return `pair', which is not compatible
 
 Warning: in toplevel procedure `foo10':
-  (scrutiny-tests.scm:109) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `pair'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#string-append', expected argument #1 of type `string' but was given an argument of type `pair'
 
 Warning: in toplevel procedure `foo10':
   expression returns 2 values but is declared to have a single result
@@ -90,10 +92,10 @@ Warning: in toplevel procedure `foo10':
   expression returns zero values but is declared to have a single result of type `*'
 
 Warning: in toplevel procedure `foo10':
-  (scrutiny-tests.scm:112) in procedure call to `scheme#*', expected argument #1 of type `number' but was given an argument of type `string'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#*', expected argument #1 of type `number' but was given an argument of type `string'
 
 Warning: in toplevel procedure `foo#blabla':
-  (scrutiny-tests.scm:137) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#+', expected argument #2 of type `number' but was given an argument of type `symbol'
 
 Warning: at toplevel:
   use of deprecated `deprecated-procedure'
@@ -102,114 +104,114 @@ Warning: at toplevel:
   use of deprecated `another-deprecated-procedure' - consider `replacement-procedure'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:168) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)'
+  (scrutiny-tests.scm:XXX) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:169) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)'
+  (scrutiny-tests.scm:XXX) in procedure call to `apply1', expected argument #2 of type `(list-of number)' but was given an argument of type `(list symbol fixnum fixnum)'
 
 Note: at toplevel:
-  (scrutiny-tests.scm:182) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true
+  (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#fixnum?', the predicate is called with an argument of type `fixnum' and will always return true
 
 Note: at toplevel:
-  (scrutiny-tests.scm:190) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:191) in procedure call to `scheme#string?', the predicate is called with an argument of type `(not (or char string))' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `(not (or char string))' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:194) in procedure call to `char-or-string?', the predicate is called with an argument of type `fixnum' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `char-or-string?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:195) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:196) in procedure call to `scheme#string?', the predicate is called with an argument of type `fixnum' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `fixnum' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:200) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `char' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `char' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:201) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:205) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#symbol?', the predicate is called with an argument of type `(or char string)' and will always return false
 
 Note: at toplevel:
-  (scrutiny-tests.scm:206) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:210) in procedure call to `f', expected argument #1 of type `pair' but was given an argument of type `null'
+  (scrutiny-tests.scm:XXX) in procedure call to `f', expected argument #1 of type `pair' but was given an argument of type `null'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:212) in procedure call to `f', expected argument #1 of type `null' but was given an argument of type `(list fixnum)'
+  (scrutiny-tests.scm:XXX) in procedure call to `f', expected argument #1 of type `null' but was given an argument of type `(list fixnum)'
 
 Warning: at toplevel:
-  (scrutiny-tests.scm:214) in procedure call to `f', expected argument #1 of type `list' but was given an argument of type `(pair fixnum fixnum)'
+  (scrutiny-tests.scm:XXX) in procedure call to `f', expected argument #1 of type `list' but was given an argument of type `(pair fixnum fixnum)'
 
 Warning: in toplevel procedure `vector-ref-warn1':
-  (scrutiny-tests.scm:220) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 3
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-ref', index -1 out of range for vector of length 3
 
 Warning: in toplevel procedure `vector-ref-warn2':
-  (scrutiny-tests.scm:222) in procedure call to `scheme#vector-ref', index 3 out of range for vector of length 3
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-ref', index 3 out of range for vector of length 3
 
 Warning: in toplevel procedure `vector-ref-warn3':
-  (scrutiny-tests.scm:223) in procedure call to `scheme#vector-ref', index 4 out of range for vector of length 3
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-ref', index 4 out of range for vector of length 3
 
 Warning: in toplevel procedure `vector-ref-standard-warn1':
-  (scrutiny-tests.scm:226) in procedure call to `scheme#vector-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `vector-set!-warn1':
-  (scrutiny-tests.scm:227) in procedure call to `scheme#vector-set!', index -1 out of range for vector of length 3
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-set!', index -1 out of range for vector of length 3
 
 Warning: in toplevel procedure `vector-set!-warn2':
-  (scrutiny-tests.scm:228) in procedure call to `scheme#vector-set!', index 3 out of range for vector of length 3
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-set!', index 3 out of range for vector of length 3
 
 Warning: in toplevel procedure `vector-set!-warn3':
-  (scrutiny-tests.scm:229) in procedure call to `scheme#vector-set!', index 4 out of range for vector of length 3
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-set!', index 4 out of range for vector of length 3
 
 Warning: in toplevel procedure `vector-set!-standard-warn1':
-  (scrutiny-tests.scm:232) in procedure call to `scheme#vector-set!', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#vector-set!', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `list-ref-warn1':
-  (scrutiny-tests.scm:238) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
 
 Warning: in toplevel procedure `list-ref-warn2':
-  (scrutiny-tests.scm:241) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
 
 Warning: in toplevel procedure `list-ref-warn3':
-  (scrutiny-tests.scm:244) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index -1 is negative, which is never valid
 
 Warning: in toplevel procedure `list-ref-warn4':
-  (scrutiny-tests.scm:246) in procedure call to `scheme#list-ref', index 3 out of range for proper list of length 3
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index 3 out of range for proper list of length 3
 
 Warning: in toplevel procedure `list-ref-warn5':
-  (scrutiny-tests.scm:252) in procedure call to `scheme#list-ref', index 4 out of range for proper list of length 3
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', index 4 out of range for proper list of length 3
 
 Warning: in toplevel procedure `list-ref-standard-warn1':
-  (scrutiny-tests.scm:281) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `list-ref-standard-warn2':
-  (scrutiny-tests.scm:282) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `list-ref-standard-warn3':
-  (scrutiny-tests.scm:284) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `list-ref-standard-warn4':
-  (scrutiny-tests.scm:285) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `scheme#list-ref', expected argument #2 of type `fixnum' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `list-ref-type-warn1':
-  (scrutiny-tests.scm:289) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `list-ref-type-warn2':
-  (scrutiny-tests.scm:291) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `list-ref-type-warn3':
-  (scrutiny-tests.scm:295) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `append-result-type-warn1':
-  (scrutiny-tests.scm:307) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
 
 Warning: in toplevel procedure `append-result-type-warn2':
-  (scrutiny-tests.scm:312) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
+  (scrutiny-tests.scm:XXX) in procedure call to `chicken.base#add1', expected argument #1 of type `number' but was given an argument of type `symbol'
 
 Warning: redefinition of standard binding: scheme#car
diff --git a/tests/specialization.expected b/tests/specialization.expected
index fed76b6b..eff536eb 100644
--- a/tests/specialization.expected
+++ b/tests/specialization.expected
@@ -1,32 +1,34 @@
+;; numbers replaced with XXX by redact-gensyms.scm
+;; prefixes: (tmp g scm:)
 
 Note: at toplevel:
-  (specialization-tests.scm:3) in procedure call to `scheme#string?', the predicate is called with an argument of type `string' and will always return true
+  (specialization-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `string' and will always return true
 
 Note: at toplevel:
-  (specialization-tests.scm:3) expected a value of type boolean in conditional, but was given a value of type `true' which is always true:
+  (specialization-tests.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `true' which is always true:
 
 (if (scheme#string? a) 'ok 'no)
 
 Note: at toplevel:
-  (specialization-tests.scm:4) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false
+  (specialization-tests.scm:XXX) in procedure call to `scheme#string?', the predicate is called with an argument of type `symbol' and will always return false
 
 Note: at toplevel:
-  (specialization-tests.scm:4) in conditional, test expression will always return false:
+  (specialization-tests.scm:XXX) in conditional, test expression will always return false:
 
 (if (scheme#string? a) 'ok 'no)
 
 Note: at toplevel:
-  (specialization-tests.scm:10) in procedure call to `scheme#input-port?', the predicate is called with an argument of type `input/output-port' and will always return true
+  (specialization-tests.scm:XXX) in procedure call to `scheme#input-port?', the predicate is called with an argument of type `input/output-port' and will always return true
 
 Note: at toplevel:
-  (specialization-tests.scm:10) expected a value of type boolean in conditional, but was given a value of type `true' which is always true:
+  (specialization-tests.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `true' which is always true:
 
 (if (scheme#input-port? p) 'ok 'no)
 
 Note: at toplevel:
-  (specialization-tests.scm:11) in procedure call to `scheme#output-port?', the predicate is called with an argument of type `input/output-port' and will always return true
+  (specialization-tests.scm:XXX) in procedure call to `scheme#output-port?', the predicate is called with an argument of type `input/output-port' and will always return true
 
 Note: at toplevel:
-  (specialization-tests.scm:11) expected a value of type boolean in conditional, but was given a value of type `true' which is always true:
+  (specialization-tests.scm:XXX) expected a value of type boolean in conditional, but was given a value of type `true' which is always true:
 
 (if (scheme#output-port? p) 'ok 'no)
-- 
2.11.0

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to