Permalink
Browse files

Test and fix for #15. Fix based on @erikd fork.

Closes #15
  • Loading branch information...
1 parent 2248d5f commit aed80f79a9a40751431b42e2905a00baca129c74 @alanz alanz committed May 6, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −1 runtests.hs
  2. +1 −0 src/Language/JavaScript/Pretty/Printer.hs
View
@@ -733,7 +733,11 @@ commentPrintSuite = testGroup "Comments"
-- https://github.com/alanz/language-javascript/issues/14
, testCase "issue14" (testRoundTrip "var z = x[i] / y;")
- ]
+
+ -- https://github.com/alanz/language-javascript/issues/15
+ , testCase "issue15" (testRoundTrip "x\t=1;")
+
+ ]
-- ---------------------------------------------------------------------
-- Test utilities
@@ -162,6 +162,7 @@ rs s (Foo (r,c) bb) = (Foo (r',c') (bb <> (text s)))
(r',c') = foldl' (\(row,col) char -> go (row,col) char) (r,c) s
go (r,c) '\n' = (r+1,1)
+ go (r,c) '\t' = (r,c+8)
go (r,c) _ = (r,c+1)

0 comments on commit aed80f7

Please sign in to comment.