summaryrefslogtreecommitdiff
path: root/tests/utils.scm
diff options
context:
space:
mode:
authorMathieu Lirzin <mthl@gnu.org>2016-05-02 17:53:40 +0200
committerMathieu Lirzin <mthl@gnu.org>2016-05-02 17:53:40 +0200
commitc3052d6bcd2193b258fb92b99291a4918931fe36 (patch)
tree0e0cbbc019e68f4f1c865b4d2f5e341eb45d96ee /tests/utils.scm
parent0bfb9b439953b755a510974e51e651f79526a5a4 (diff)
parentb74f64a960542b0679ab13de0dd28adc496cf084 (diff)
downloadgnu-guix-c3052d6bcd2193b258fb92b99291a4918931fe36.tar
gnu-guix-c3052d6bcd2193b258fb92b99291a4918931fe36.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'tests/utils.scm')
-rw-r--r--tests/utils.scm13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/utils.scm b/tests/utils.scm
index 6b7725554f..d0ee02a1cf 100644
--- a/tests/utils.scm
+++ b/tests/utils.scm
@@ -333,6 +333,19 @@
"This is a journey\r\nInto the sound\r\nA journey ...\n")))
(get-string-all (canonical-newline-port port))))
+
+(test-equal "edit-expression"
+ "(display \"GNU Guix\")\n(newline)\n"
+ (begin
+ (call-with-output-file temp-file
+ (lambda (port)
+ (display "(display \"xiuG UNG\")\n(newline)\n" port)))
+ (edit-expression `((filename . ,temp-file)
+ (line . 0)
+ (column . 9))
+ string-reverse)
+ (call-with-input-file temp-file get-string-all)))
+
(test-end)
(false-if-exception (delete-file temp-file))