123456789101112131415161718192021222324252627282930313233 |
- (use-modules
-
- (srfi srfi-64)
-
- (utils display))
- (test-begin "display-utils-test")
- (test-group
- "displayln"
-
- (test-equal "displayln with empty string should ee a newline"
- "\n"
- (call-with-output-string
- (lambda (port)
- (displayln "" port))))
- (test-equal "displayln with normal message"
- "Hello!\n"
- (call-with-output-string
- (lambda (port)
- (displayln "Hello!" port))))
- (test-equal "displayln with message ending on newline should have 2 newlines"
- "This is my message!\n\n"
- (call-with-output-string
- (lambda (port)
- (displayln "This is my message!\n" port)))))
- (test-end "display-utils-test")
|