diff options
author | Arun Isaac | 2023-11-06 15:39:06 +0000 |
---|---|---|
committer | Arun Isaac | 2023-11-06 15:39:06 +0000 |
commit | 458011fbb95610d1afbcc077df938213e7426582 (patch) | |
tree | a22d5858074a93a433fad037ca66f50b5de88849 /tests | |
parent | 575410631f6ad4670c0fef1cff668887637c0de8 (diff) | |
download | ccwl-458011fbb95610d1afbcc077df938213e7426582.tar.gz ccwl-458011fbb95610d1afbcc077df938213e7426582.tar.lz ccwl-458011fbb95610d1afbcc077df938213e7426582.zip |
ui: Do not attempt to display the line preceding the 0th.
* ccwl/ui.scm (source-in-context): Do not attempt to display the line
preceding the 0th.
* tests/ui.scm ("display source in context on 0th line"): New line.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ui.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui.scm b/tests/ui.scm index f7810d7..4189e6c 100644 --- a/tests/ui.scm +++ b/tests/ui.scm @@ -35,4 +35,12 @@ " (cut source-in-context <> 1 2))) +(test-equal "display source in context on 0th line" + (string-append "(foo " + (colorize-string "(bar)" 'BOLD 'RED) + ") +") + (call-with-input-string "(foo (bar))" + (cut source-in-context <> 0 5))) + (test-end "ui") |