Ticket #3830 (new task) — at Version 2

Opened 7 years ago

Last modified 7 years ago

mcedit: create a corpus of sample files in various syntaxes for testing purposes

Reported by: mooffie Owned by:
Priority: major Milestone: Future Releases
Component: mcedit Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description (last modified by mooffie) (diff)

(Henceforth, "syntax" == "syntax highlighting".)

Our editor has many syntax definitions (*.syntax files).

If we ever fix things on the C side of mcedit, or modify a syntax definition file, we'll have a problem: since we don't have a collection of sample files, in the various syntaxes, to test our fixes against, we (the maintainers) would have to create these sample files ourselves. And we'd have to create good files: such that demonstrate every nook and cranny in the syntax definitions.

This is a lot of work, so I suggest we start small: have just one or two sample files for now, close this ticket, and add more sample files as time goes by.

To alleviate this burden we ought to make a rule:

Any new syntax definition must be contributed together with a sample file(s). The people writing the syntax files know their language best, so they're the ones who should provide the samples.

Change History

comment:1 Changed 7 years ago by mooffie

Some random notes:

  • The corpus can be placed in tests/src/editor/curpus in the meantime.
  • For documentation purposes, we should also collect files that show imperfections/bugs in our syntax definitions (we could embed the string ".fail." in their filenames). This does not imply that we're intending to fix these imperfections.
  • This ticket does not deal with the testing code itself (regression test; this can be very easily implemented when/if mc has scripting support; mc2 proves this).

comment:2 Changed 7 years ago by mooffie

  • Description modified (diff)
Note: See TracTickets for help on using tickets.