Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bad manifest filenames tests #845

Merged
merged 2 commits into from
Nov 7, 2023
Merged

Commits on Nov 7, 2023

  1. Modularise check + add forbidden filename

    Add another forbidden file name in submissions: prog.alt (prog.alt.c is
    allowed).
    
    Modularise the checks for invalid filenames in entries. For instance in
    check_extra_file() there's no need to check each extra filename and then give
    the same error message changing the macro of the filename that's disallowed when
    we can just print the string being tested against. The only difference is that
    there's one if (with multiple checks) and instead of duplicating the same error
    message we just print it once with the string being tested against. Note that
    there are two sets of checks: one for extra files being required filenames and
    another for disallowed filenames.
    
    Make sure to use the macros for the filenames, not the literal strings (e.g. use
    PROG_FILENAME not "prog").
    
    Check filenames in alphabetical order (I think :-) .. very tired so maybe missed
    one or two).
    
    Note that the function check_extra_file() CANNOT be used in every case so it's
    not used except in chkentry!
    xexyl committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    2d4bb86 View commit details
    Browse the repository at this point in the history
  2. Add bad manifest filenames tests

    Each forbidden filename in the manifest now has a separate file to check
    it including prog.alt. The -34.json file was also updated to have
    prog.alt as an extra filename though it might be better to also check
    this for other files too if this is not done (been too long and too many
    other changes in the other repo to recall if this is done or not).
    
    That means that under test_ioccc/test_JSON/info.json/bad individual
    files that have an extra file with the names of:
    
    - README.md
    - index.html
    - inventory.html
    - prog
    - prog.alt
    - prog.orig
    - prog.orig.c
    
    have been added. Unless other files have to be added later to the list
    of disallowed filenames or there needs to be a more specific check in
    mkiocccentry for filenames of the required files this should complete
    the disallowed and required filenames checks.
    xexyl committed Nov 7, 2023
    Configuration menu
    Copy the full SHA
    c6d71f3 View commit details
    Browse the repository at this point in the history