summaryrefslogtreecommitdiff
path: root/palindrome/palindrome-test.scm
blob: 410915449506070d412e549d8c22b65d14c0d00c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
(use-modules (srfi srfi-64)
             (palindrome))

(test-begin "harness")


(test-equal "test-not-palindrome"
  #f
  (palindrome? "palindrome"))

(test-equal "test-is-palindrome"
  #t
  (palindrome? "racecar"))

(test-equal "test-not-palindrome-bad-casing"
  #f
  (palindrome? "paLINDROMe"))

(test-equal "test-palindrome-bad-casing"
  #t
  (palindrome? "raCECAr"))

(test-equal "test-pp-not-palindrome"
  "String paLINDROMe is not a palindrome!\n"
  (pp "paLINDROMe"))


(test-equal "test-pp-palindrome"
  "String raCECAr is a palindrome!\n"
  (pp "raCECAr"))


(test-end "harness")