-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial tests for document with several scores and with document header
- Loading branch information
Showing
6 changed files
with
63 additions
and
19 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
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,9 @@ | ||
\header | ||
title: Testing document with document header | ||
author: the author of gly | ||
|
||
\score | ||
mode: 8 | ||
description: Basic alleluia | ||
c4 g gh g g | ||
A -- lle -- lu -- ia |
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,10 @@ | ||
\score | ||
mode: 8 | ||
description: Basic alleluia | ||
c4 g gh g g | ||
A -- lle -- lu -- ia | ||
|
||
\score | ||
description: Another simple alleluia | ||
c4 g gj hig h | ||
A -- lle -- lu -- ia |
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,20 @@ | ||
require_relative 'test_helper' | ||
|
||
# tests of cases that cannot be easily described by a pair | ||
# of single gly file and resulting gabc file | ||
class TestNoCrash < GlyTest | ||
def self.nocrash_test_case(filename) | ||
case_name = File.basename(filename).sub(/\.[^\.]*\Z/, '') | ||
define_method "test_#{case_name}" do | ||
File.open filename do |fr| | ||
# simply let it convert to test that it does not crash | ||
gly_process(fr).string | ||
end | ||
end | ||
end | ||
|
||
here = File.dirname __FILE__ | ||
Dir.glob(File.join(here, 'examples/gly/no_crash/*.gly')).each do |f| | ||
nocrash_test_case f | ||
end | ||
end |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
require_relative 'examples' | ||
require_relative 'no_crash' |
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