fix-whitespace: Added test for custom charsets
diff --git a/tests/trailing_whitespace_fixer_test.py b/tests/trailing_whitespace_fixer_test.py
index 82c9b6d..ec4c918 100644
--- a/tests/trailing_whitespace_fixer_test.py
+++ b/tests/trailing_whitespace_fixer_test.py
@@ -78,3 +78,19 @@
     ret = main([path.strpath])
     assert ret == 1
     assert path.size() == (len(non_utf8_bytes_content) - 1)
+
+
+def test_custom_charset_change(tmpdir):
+    # strip spaces only, no tabs
+    path = tmpdir.join('file.txt')
+    path.write('\ta \t \n')
+    ret = main([path.strpath, '--chars', ' '])
+    assert ret == 1
+    assert path.read() == '\ta \t\n'
+
+
+def test_custom_charset_no_change(tmpdir):
+    path = tmpdir.join('file.txt')
+    path.write('\ta \t\n')
+    ret = main([path.strpath, '--chars', ' '])
+    assert ret == 0