tests/test_git: Fix test failure on FreeBSD

Closes: #872826 Thanks: Ximin Luo <infinity0@debian.org> for the initial patch Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mattia@debian.org>
parent f7897182
......@@ -19,6 +19,7 @@
import pytest
from diffoscope.tools import get_current_os
from diffoscope.comparators.git import GitIndexFile
from ..utils.data import get_data, load_fixture
......@@ -42,5 +43,8 @@ def differences(git1, git2):
def test_diff(differences):
expected_diff = get_data('git_expected_diff')
if get_current_os == 'FreeBSD':
expected_diff = get_data('git_expected_diff_freebsd')
else:
expected_diff = get_data('git_expected_diff')
assert differences[0].unified_diff == expected_diff
@@ -10,7 +10,18 @@
User ID: 1000
Group ID: 1000
Created: 1471689380.154572964
Modified: 1471689380.154572964
Inode: 52205983
Device ID: (0, 2054)
+Path: b'b'
+SHA: e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
+Size: 0
+Flags: 0b1
+User ID: 1000
+Group ID: 1000
+Created: 1471689417.184218147
+Modified: 1471689417.184218147
+Inode: 52206041
+Device ID: (0, 2054)
+
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment