guile: tests: Fix encoding of "atomic" message

It's stated to be US-ASCII with 7-bit encoding, but it contains the
UTF-8 character '—'.

Fixing the encoding very slightly changes the average size of messages
reported by mu:average, so adjust the new expected value.
This commit is contained in:
Thiago Jung Bauermann
2025-01-03 15:17:37 -03:00
parent 8c0f136a50
commit a703f00214
2 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ exec guile -e main -s $0 $@
(str-equal-or-exit (mu:subject msg) "atoms") (str-equal-or-exit (mu:subject msg) "atoms")
(str-equal-or-exit (mu:to msg) "Democritus <demo@example.com>") (str-equal-or-exit (mu:to msg) "Democritus <demo@example.com>")
(str-equal-or-exit (mu:from msg) "Richard P. Feynman <rpf@example.com>") (str-equal-or-exit (mu:from msg) "Richard P. Feynman <rpf@example.com>")
;;(str-equal-or-exit (mu:header msg "Content-transfer-encoding") "7BIT") ;;(str-equal-or-exit (mu:header msg "Content-Transfer-Encoding") "8bit")
(if (not (equal? (mu:priority msg) mu:prio:high)) (if (not (equal? (mu:priority msg) mu:prio:high))
(error-exit "Expected ~a, got ~a" (mu:priority msg) mu:prio:high)))) (error-exit "Expected ~a, got ~a" (mu:priority msg) mu:prio:high))))
@ -97,7 +97,7 @@ exec guile -e main -s $0 $@
(define (test-stats) (define (test-stats)
"Test statistical functions." "Test statistical functions."
;; average ;; average
(num-equal-or-exit (mu:average mu:size) 82601/14) (num-equal-or-exit (mu:average mu:size) 41299/7)
(num-equal-or-exit (floor (mu:stddev mu:size)) 12637.0) (num-equal-or-exit (floor (mu:stddev mu:size)) 12637.0)
(num-equal-or-exit (mu:max mu:size) 46308) (num-equal-or-exit (mu:max mu:size) 46308)
(num-equal-or-exit (mu:min mu:size) 111)) (num-equal-or-exit (mu:min mu:size) 111))

View File

@ -4,8 +4,8 @@ Subject: atoms
To: "Democritus" <demo@example.com> To: "Democritus" <demo@example.com>
Message-id: <3BE9E6535E302944823E7A1A20D852173@msg.id> Message-id: <3BE9E6535E302944823E7A1A20D852173@msg.id>
MIME-version: 1.0 MIME-version: 1.0
Content-type: text/plain; charset=us-ascii Content-Type: text/plain; charset=UTF-8
Content-transfer-encoding: 7BIT Content-Transfer-Encoding: 8bit
Precedence: high Precedence: high
If, in some cataclysm, all scientific knowledge were to be destroyed, If, in some cataclysm, all scientific knowledge were to be destroyed,