Features and their tests
Everything the Guitar Pro plugins do, and the tests that check it. The test names are the ones cargo test prints (a name starting with a package, such as oxiguitar-gp5-plugin/, is that plugin’s own test); a stage: is a step of scripts/test-all.py. The script fails when a feature here names no test, or names a test that doesn’t exist, so a new feature gets its row and its tests in the same pull request (the Testing page says how to run them, on your own files too).
The five plugins (gp3, gp4, gp5, gpx, gp) share the readers and writers of the oxiguitar-formats crate. CI also has other programs read what we write (interop.yml: alphaTab and MuseScore 4); that needs those programs, so it isn’t part of the script.
| Feature | What it does | Tests |
|---|---|---|
| Recognises Guitar Pro files by their contents | Guitar Pro 3, 4 and 5 by their header, 6 by its BCFZ or BCFS container, 7 and 8 by their ZIP’s contents, whatever the extension says (our corpus has Guitar Pro 5 files named .gp3). | detect::tests::guitar_pro_versions, detect::tests::containers_and_text, detect::tests::zip_contents_decide, guitar_pro::format_comes_from_contents |
| Reads Guitar Pro 3, 4 and 5 | Every version’s header, tracks, bars and beats, alternate endings, Windows-1252 texts; what the reader reads is what the writer wrote. | guitar_pro::reads_each_version, guitar_pro::public_fixtures_match_the_writer, gp::tests::versions, gp::tests::gp3_alternate_endings, binary::tests::guitar_pro_strings, binary::tests::windows_1252_text, binary::tests::reads_little_endian |
| Reads Guitar Pro 6, 7 and 8 | The .gpx container (compressed or not) and the .gp ZIP, their score XML, the same music as the Guitar Pro 5 reader where both have it. | gpif::reads_gp7_and_gpx, gpif::uncompressed_gpx_reads_too, gpif::agrees_with_the_gp5_reader, gpif::public_fixtures_match_the_writer, container::tests::bcfs_file_system, container::tests::bcfz_literals_and_back_references, container::tests::part_configuration_flags, xml::tests::tree_text_cdata_and_attributes |
| Notes, effects and marks | Bends as curves, brushes, tied notes keeping their fret, chord diagrams with their strings and base fret, colours and directions, Guitar Pro’s default rows. | gpif::effects::tests::bend_curve_points, gpif::effects::tests::brush_lengths, gpif::tied_notes_keep_their_fret, gpif::tests::chord_diagram_strings_and_base_fret, gpif::tests::colors_and_directions, gpif::tests::guitar_pros_default_rows |
| Clefs | Guitar Pro 3 to 5 store none: the clef comes from the instrument, as Guitar Pro 7 gives it on converting. | gp::tests::clefs_come_from_the_instrument, gp5_round_trip::clefs_are_not_stored |
Writes Guitar Pro 7 and 8 (.gp) | A .gp file reads back exactly and loses nothing; any other file comes back the same in its normal form, unless the writer named a loss. Free time, the palette’s marks, spellings, mixer values, every program’s sound and the kit’s drums, chord spellings Guitar Pro agrees with, as Guitar Pro 7.6 writes them. | round_trip::fixtures_round_trip, round_trip::free_time_round_trips, round_trip::the_palette_s_marks_round_trip, round_trip::unchosen_spellings_stay_unchosen_in_every_key, gpif::write::*, gpif::write::chord::*, guitar_pro_7_6_own::* |
Writes Guitar Pro 5 (.gp5) | A real Guitar Pro 5 file; what it can’t hold is named; beams follow the beat. | gp5_round_trip::fixtures_round_trip, gp5_round_trip::the_file_is_a_guitar_pro_5_file, gp::write::tests::beams_follow_the_beat, gp::write::tests::steps_of_the_table, binary::tests::text_is_written_as_windows_1252 |
| Damaged files | Errors naming where, never panics: damaged and truncated bytes, damaged XML, counts bounded. | guitar_pro::damaged_bytes_never_panic, guitar_pro::truncated_files_give_errors_not_panics, gpif::damaged_bytes_never_panic, gpif::damaged_gpif_never_panics, gpif::truncated_files_give_errors_not_panics, gpif::not_a_score, xml::tests::errors_do_not_panic, binary::tests::counts_are_bounded, error::tests::error_message_names_position, error::tests::repeated_messages_are_counted |
| Five plugins, one format each | Each plugin recognises and reads its own format and refuses the others; gp and gp5 also write; a file no plugin recognises gets the right report; format plugins add no views. | host::each_plugin_recognises_and_reads_its_own_format_and_nothing_else, host::the_plugins_read_every_file_exactly_as_the_readers_do, host::a_file_no_plugin_recognises_is_refused_with_the_right_report, host::a_disabled_plugin_and_no_plugin_at_all, host::format_plugins_add_no_views_and_hear_no_events, plugin_formats::formats_without_a_reader_are_refused_clearly, tests::its_signatures_recognise_its_fixture_only, tests::reads_its_own_format, oxiguitar-gp-plugin/lib::tests::writes_what_it_reads, oxiguitar-gp5-plugin/lib::tests::writes_what_it_reads |
| Across the plugin interface | Scores cross the plugin interface (3.0) without loss, a bar in free time too; errors and logs read the same on both sides. | wire::fixtures_and_references_cross_without_loss, plugin::tests::a_fixture_crosses_with_its_log, plugin::tests::errors_read_the_same_across_the_interface |
| Your Guitar Pro files | Every Guitar Pro file of the corpus reads with a sound structure, round-trips through .gp and .gp5, crosses the interface, and opens through the plugins exactly as in-process; songs of our corpus saved in two formats agree, where they are there. | corpus::every_corpus_guitar_pro_file_reads, round_trip::corpus_round_trips, gp5_round_trip::corpus_round_trips, wire::the_corpus_crosses_without_loss, host::the_plugins_read_every_corpus_file_as_the_readers_do, corpus::songs_in_two_formats_agree |
| Through the newest OxiGuitar | Every Guitar Pro file of the corpus, through the newest OxiGuitar’s oxiguitar-cli and these plugins’ files: recognised, read, written as .gp and .gp5 three times, settling after the first trip. | stage:corpus through the core |
| Working plugin files | Each .oxp file keeps the plugin contract, with this repository’s SDK version and with the newest release of OxiGuitar. | contract::the_plugin_file_keeps_the_contract, oxiguitar_plugin_checks::the_manifest_matches_the_plugin, stage:contract (latest core) |