Skip to content

Commit

Permalink
Remove header from expected result in tests
Browse files Browse the repository at this point in the history
This avoids the test results being dependent on the version number and
copyright info, which should avoid having to update them upon releases.
  • Loading branch information
cwendling authored and sthibaul committed Sep 28, 2023
1 parent eca983d commit 72ae7e6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 21 deletions.
5 changes: 0 additions & 5 deletions tests/Pierre_Rabhi_Vers_la_sobriete_heureuse.expected
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
(C)2003-2021 J. Lemmens
Daisy-player - Version 13.0
A parser to play Daisy CD's with Linux
Scanning for a Daisy CD...

SPINE (61):
1: Pierre_Rabhi_Vers_la_sobriete_heureuse/speechgen0002.smil#tcp70
2: Pierre_Rabhi_Vers_la_sobriete_heureuse/speechgen0003.smil#tcp78
Expand Down
5 changes: 0 additions & 5 deletions tests/S07241.expected
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
(C)2003-2021 J. Lemmens
Daisy-player - Version 13.0
A parser to play Daisy CD's with Linux
Scanning for a Daisy CD...

SPINE (42):
1: S07241/001_Le_Petit_Prince.smil#par_001_Le_Petit_Prince_0_0
2: S07241/002_Quatrieme_de_couverture.smil#par_002_Quatrieme_de_couverture_0_0
Expand Down
5 changes: 0 additions & 5 deletions tests/Six_points_de_lumiere.expected
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
(C)2003-2021 J. Lemmens
Daisy-player - Version 13.0
A parser to play Daisy CD's with Linux
Scanning for a Daisy CD...

SPINE (22):
1: Six_points_de_lumiere/rjyt0002.smil#rjyt_0001
2: Six_points_de_lumiere/rjyt0013.smil#rjyt_0012
Expand Down
5 changes: 0 additions & 5 deletions tests/Y9621.expected
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
(C)2003-2021 J. Lemmens
Daisy-player - Version 13.0
A parser to play Daisy CD's with Linux
Scanning for a Daisy CD...

SPINE (33):
1: Y9621/wkds0001.smil#aloj_0002
2: Y9621/wkds0002.smil#aloj_0002
Expand Down
9 changes: 8 additions & 1 deletion tests/run1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,14 @@ input="${expected%.*}"
sed_safe_abs_srcdir=$(printf %s "${abs_srcdir}" | sed 's%[].\[*]%\\\0%g')

# run daisy-player -D
"$1" -D "$input" | sed "s%${sed_safe_abs_srcdir}%%g;s%/[.]/%%" > "$actual"
"$1" -D "$input" | sed "
# strip the header
1,5d
# remove the source dir part of the path
s%${sed_safe_abs_srcdir}%%g
# sanitize path
s%/[.]/%%
" > "$actual"

# compare the result with the expectations
$generate || diff -u "$expected" "$actual"

0 comments on commit 72ae7e6

Please sign in to comment.