From aca6124cfda889148aa6f8919fa183dedbc63fd1 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sat, 3 Oct 2026 13:21:46 +0100 Subject: Restore null character handling test. With the new std_string_view.i, the test no longer crashes the test runner process. --- tests/smoketest.scm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tests/smoketest.scm') diff --git a/tests/smoketest.scm b/tests/smoketest.scm index b7a84b8..5a7dd16 100644 --- a/tests/smoketest.scm +++ b/tests/smoketest.scm @@ -81,14 +81,12 @@ after." ;; scm_to_stringn does not allow strings containing null characters to ;; be converted to C strings. So, this test can never actually pass. -;; And, we keep it commented out because running it raises an -;; exception and crashes the test runner process. -;; (test-expect-fail "document does not transparently handle a zero byte") -;; (let* ((data "a\0b") -;; (doc (make-document #:data data))) -;; (test-equal "document does not transparently handle a zero byte" -;; data -;; (document-data (make-document #:data data)))) +(test-expect-fail "document does not transparently handle a zero byte") +(let* ((data "a\0b") + (doc (make-document #:data data))) + (test-equal "document does not transparently handle a zero byte" + data + (document-data (make-document #:data data)))) (call-with-temporary-writable-database "/tmp/xapian-db" (lambda (db) -- cgit 1.4.1