Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test + refactor to the escapearg method to use regular expressions
- Loading branch information
Showing
3 changed files
with
15 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
#-*- coding: utf-8 -*- | ||
import tdaemon | ||
import unittest | ||
|
||
class Test(unittest.TestCase): | ||
|
||
def test_remove_special_chars(self): | ||
arguments = r'This is an arguments list + special chars #&;`|*?~<>^()[]{}$\\' | ||
expected = 'This is an arguments list + special chars ' | ||
self.assertEqual(tdaemon.escapearg(arguments), expected) |