diff --git a/test/mocha/test-transposing-instruments.js b/test/mocha/test-transposing-instruments.js new file mode 100644 index 0000000..4681a49 --- /dev/null +++ b/test/mocha/test-transposing-instruments.js @@ -0,0 +1,20 @@ +"use strict"; + +const assert = require('assert'); +const xpath = require('fontoxpath'); +const utils = require('./utils'); + +const mei = utils.getTestMeiDom('transposing-instruments.mei'); + +describe("scoreDef", function() { + const staffDefs = xpath.evaluateXPath("//*:staffDef", mei); + it("@trans.semi", function() { + assert.deepStrictEqual(staffDefs.map(s => s.getAttribute("trans.semi")), ["-2", "-7", null]); + }); + it("@trans.diat", function() { + assert.deepStrictEqual(staffDefs.map(s => s.getAttribute("trans.diat")), ["-1", "-4", null]); + }); +}); + +// TODO: The test file has an instrument change with changing transposition that +// is not exported properly diff --git a/test/sibmeiTestSibs/transposing-instruments.sib b/test/sibmeiTestSibs/transposing-instruments.sib new file mode 100644 index 0000000..1a71762 Binary files /dev/null and b/test/sibmeiTestSibs/transposing-instruments.sib differ