rlb pushed a commit to branch main
in repository guile.

commit 0ffa802be2074f78732b56b0c0f4732260c28e80
Author: Rob Browning <r...@defaultvalue.org>
AuthorDate: Fri Apr 5 17:39:06 2024 -0500

    eval-string.test: check source properties
    
    * test-suite/tests/eval-string.test: add properties test.
    
    cf. 025bb024ae4b586dc721e3d2e3471fbea5f8cc81
---
 NEWS                              | 1 +
 test-suite/tests/eval-string.test | 7 ++++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/NEWS b/NEWS
index e1557bfc7..799b37069 100644
--- a/NEWS
+++ b/NEWS
@@ -55,6 +55,7 @@ This speeds up copying large files a lot while saving the 
disk space.
 ** 'make-custom-port' now honors its #:conversion-strategy argument
 ** Hashing of UTF-8 symbols with non-ASCII characters avoids corruption
    (<https://bugs.gnu.org/56413>)
+** 'eval-string' respects #:column (previously it was set to the #:line)
 
 This issue could cause `scm_from_utf8_symbol' and
 `scm_from_utf8_symboln` to incorrectly conclude that the symbol hadn't
diff --git a/test-suite/tests/eval-string.test 
b/test-suite/tests/eval-string.test
index 8cef244bf..33068a272 100644
--- a/test-suite/tests/eval-string.test
+++ b/test-suite/tests/eval-string.test
@@ -51,4 +51,9 @@
     (equal? (call-with-values (lambda ()
                                 (eval-string "(values 1 2)" #:compile? #t))
               list)
-            '(1 2))))
\ No newline at end of file
+            '(1 2)))
+
+  (pass-if-equal "source properties"
+      '((filename . "test.scm") (line . 3) (column . 42))
+    (source-properties
+     (eval-string "'(1 2)" #:file "test.scm" #:line 3 #:column 41))))

Reply via email to