diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-12 09:59:06 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-12 09:59:06 -0800 |
commit | e9f1de639d80330b940c1b733a94bd9bf2ac8631 (patch) | |
tree | 34aa22373bf075bb737c6053da61b4c658daccfa /tests | |
parent | 3ebfcd0ceaccfb7ee0d7c4d2310890e08919e303 (diff) | |
download | pandoc-e9f1de639d80330b940c1b733a94bd9bf2ac8631.tar.gz |
test diff output: put +/- at beginning of line.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Old.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/Old.hs b/tests/Old.hs index 1d9540fdd..ef04f4a4e 100644 --- a/tests/Old.hs +++ b/tests/Old.hs @@ -38,9 +38,12 @@ instance Show TestResult where showDiff :: (Int,Int) -> [(DI, String)] -> String showDiff _ [] = "" -showDiff (l,r) ((F, ln) : ds) = printf "%4d +" l ++ ln ++ "\n" ++ showDiff (l+1,r) ds -showDiff (l,r) ((S, ln) : ds) = printf "%4d -" r ++ ln ++ "\n" ++ showDiff (l,r+1) ds -showDiff (l,r) ((B, _ ) : ds) = showDiff (l+1,r+1) ds +showDiff (l,r) ((F, ln) : ds) = + printf "+%4d " l ++ ln ++ "\n" ++ showDiff (l+1,r) ds +showDiff (l,r) ((S, ln) : ds) = + printf "-%4d " r ++ ln ++ "\n" ++ showDiff (l,r+1) ds +showDiff (l,r) ((B, _ ) : ds) = + showDiff (l+1,r+1) ds tests :: [Test] tests = [ testGroup "markdown" [ testGroup "writer" (writerTests "markdown" ++ lhsWriterTests "markdown") |