1
0
Fork 0
mirror of https://github.com/topydo/topydo.git synced 2024-05-10 02:38:35 +00:00

Enforce Unix line endings in test data

This commit is contained in:
Bram Schoenmakers 2016-11-17 20:21:07 +01:00
parent 71c7097006
commit 985f9b6d22
2 changed files with 7 additions and 4 deletions

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
test/data/* text eol=lf
test/data/*.ics binary

View file

@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import os
from test.topydo_testcase import TopydoTest
from topydo.lib.Utils import escape_ansi
@ -27,12 +28,12 @@ class CommandTest(TopydoTest):
def out(self, p_output):
if isinstance(p_output, list) and p_output:
self.output += escape_ansi(
"\n".join([str(s) for s in p_output]) + "\n")
os.linesep.join([str(s) for s in p_output]) + os.linesep)
elif p_output:
self.output += str(p_output) + "\n"
self.output += str(p_output) + os.linesep
def error(self, p_error):
if isinstance(p_error, list) and p_error:
self.errors += escape_ansi(p_error + "\n") + "\n"
self.errors += escape_ansi(p_error + os.linesep) + os.linesep
elif p_error:
self.errors += str(p_error) + "\n"
self.errors += str(p_error) + os.linesep