From 4d03e1ba9af4116075569cac7830892388642074 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Sat, 4 Jun 2016 11:06:07 -0400 Subject: [PATCH] tests: add test for source.exclude ini entry Signed-off-by: Jean Privat --- tests/nitls.args | 2 + tests/nitpick.args | 1 + tests/sav/nitdoc_args4.res | 59 ++++++++++++++++++++-------- tests/sav/nitls_args7.res | 12 ++++++ tests/sav/nitls_args8.res | 2 + tests/sav/test_neo_args1.res | 8 ++-- tests/sav/test_sort_perf_args1.res | 3 ++ tests/test_prog/game/excluded.nit | 1 + tests/test_prog/game/excluded_dir/more.nit | 1 + tests/test_prog/package.ini | 2 + 10 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 tests/sav/nitls_args7.res create mode 100644 tests/sav/nitls_args8.res create mode 100644 tests/test_prog/game/excluded.nit create mode 100644 tests/test_prog/game/excluded_dir/more.nit diff --git a/tests/nitls.args b/tests/nitls.args index 568f76a..e79a1e1 100644 --- a/tests/nitls.args +++ b/tests/nitls.args @@ -4,3 +4,5 @@ base_simple3.nit project1 -s base_simple3.nit project1 -M base_simple3.nit base_simple_import.nit -td project1/module3.nit +test_prog --no-color +test_prog/game/excluded.nit test_prog/game/excluded_dir/more.nit -t --no-color diff --git a/tests/nitpick.args b/tests/nitpick.args index 396ac26..1ef81d1 100644 --- a/tests/nitpick.args +++ b/tests/nitpick.args @@ -1,3 +1,4 @@ --no-color -W test_advice_repeated_types.nit --no-color base_simple3.nit; echo $? --no-color error_mod_unk.nit; echo $? +--no-color test_prog diff --git a/tests/sav/nitdoc_args4.res b/tests/sav/nitdoc_args4.res index 01782ba..9238b51 100644 --- a/tests/sav/nitdoc_args4.res +++ b/tests/sav/nitdoc_args4.res @@ -1,8 +1,35 @@ +Empty README for group `excluded` (readme-warning) +Errors: 0. Warnings: 1. +MGroupPage excluded + # excluded.section + ## excluded.intro + ## excluded.concerns + ## excluded.concern + ## excluded.concern + ## excluded-.concern + ### excluded-.definition + #### excluded-.intros_redefs + ##### list.group + ###### excluded-.intros + ###### excluded-.redefs + +MModulePage excluded + # excluded.section + ## excluded-.intro + ## excluded-.importation + ### excluded-.graph + ### list.group + #### excluded-.imports + #### excluded-.clients + OverviewPage Overview # home.article ## packages.section + ### excluded.definition ### test_prog.definition +ReadmePage excluded + ReadmePage test_prog # mdarticle-0 @@ -1007,24 +1034,24 @@ MModulePage rpg #### test_prog__rpg__rpg.imports #### test_prog__rpg__rpg.clients -Generated 96 pages +Generated 99 pages list: - MPropertyPage: 58 (60.41%) - MClassPage: 20 (20.83%) - MModulePage: 8 (8.33%) - MGroupPage: 4 (4.16%) - ReadmePage: 4 (4.16%) - SearchPage: 1 (1.04%) - OverviewPage: 1 (1.04%) -Found 182 mentities + MPropertyPage: 58 (58.58%) + MClassPage: 20 (20.20%) + MModulePage: 9 (9.09%) + ReadmePage: 5 (5.05%) + MGroupPage: 5 (5.05%) + SearchPage: 1 (1.01%) + OverviewPage: 1 (1.01%) +Found 185 mentities list: - MMethodDef: 68 (37.36%) - MMethod: 57 (31.31%) - MClassDef: 22 (12.08%) - MClass: 20 (10.98%) - MModule: 8 (4.39%) - MGroup: 4 (2.19%) + MMethodDef: 68 (36.75%) + MMethod: 57 (30.81%) + MClassDef: 22 (11.89%) + MClass: 20 (10.81%) + MModule: 9 (4.86%) + MGroup: 5 (2.70%) + MPackage: 2 (1.08%) MVirtualTypeDef: 1 (0.54%) MVirtualTypeProp: 1 (0.54%) - MPackage: 1 (0.54%) quicksearch-list.js diff --git a/tests/sav/nitls_args7.res b/tests/sav/nitls_args7.res new file mode 100644 index 0000000..a0a686e --- /dev/null +++ b/tests/sav/nitls_args7.res @@ -0,0 +1,12 @@ +test_prog: Test program for model tools. (test_prog) +|--game: Gaming group (test_prog/game) +| `--game: A game abstraction for RPG. (test_prog/game/game.nit) +|--platform: Fictive Crappy Platform. (test_prog/platform) +| `--platform: Declares base types allowed on the platform. (test_prog/platform/platform.nit) +|--rpg: Role Playing Game group (test_prog/rpg) +| |--careers: Careers of the game. (test_prog/rpg/careers.nit) +| |--character: Characters are playable entity in the world. (test_prog/rpg/character.nit) +| |--combat: COmbat interactions between characters. (test_prog/rpg/combat.nit) +| |--races: Races of the game. (test_prog/rpg/races.nit) +| `--rpg: A worlg RPG abstraction. (test_prog/rpg/rpg.nit) +`--test_prog: A test program with a fake model to check model tools. (test_prog/test_prog.nit) diff --git a/tests/sav/nitls_args8.res b/tests/sav/nitls_args8.res new file mode 100644 index 0000000..b80e7ce --- /dev/null +++ b/tests/sav/nitls_args8.res @@ -0,0 +1,2 @@ +excluded (test_prog/game/excluded.nit) +more (test_prog/game/excluded_dir/more.nit) diff --git a/tests/sav/test_neo_args1.res b/tests/sav/test_neo_args1.res index 4ac86da..fdc3be7 100644 --- a/tests/sav/test_neo_args1.res +++ b/tests/sav/test_neo_args1.res @@ -1,12 +1,12 @@ # mpackages: -test_prog +excluded test_prog ------------------------------------ -test_prog +excluded test_prog # mmodules: -careers character combat game platform races rpg test_prog +careers character combat excluded game platform races rpg test_prog ------------------------------------ -careers character combat game platform races rpg test_prog +careers character combat excluded game platform races rpg test_prog # mclasses: Alcoholic Bool Career Character Combatable Dwarf Elf Float Game Human Int List Magician Object Race Starter String Sys Warrior Weapon diff --git a/tests/sav/test_sort_perf_args1.res b/tests/sav/test_sort_perf_args1.res index 01532de..b1fe714 100644 --- a/tests/sav/test_sort_perf_args1.res +++ b/tests/sav/test_sort_perf_args1.res @@ -2,6 +2,9 @@ test_prog/ |--test_prog/README.md |--test_prog/game | |--test_prog/game/README.md +| |--test_prog/game/excluded.nit +| |--test_prog/game/excluded_dir +| | `--test_prog/game/excluded_dir/more.nit | `--test_prog/game/game.nit |--test_prog/package.ini |--test_prog/platform diff --git a/tests/test_prog/game/excluded.nit b/tests/test_prog/game/excluded.nit new file mode 100644 index 0000000..d296d4b --- /dev/null +++ b/tests/test_prog/game/excluded.nit @@ -0,0 +1 @@ +This is not a valid Nit program diff --git a/tests/test_prog/game/excluded_dir/more.nit b/tests/test_prog/game/excluded_dir/more.nit new file mode 100644 index 0000000..d296d4b --- /dev/null +++ b/tests/test_prog/game/excluded_dir/more.nit @@ -0,0 +1 @@ +This is not a valid Nit program diff --git a/tests/test_prog/package.ini b/tests/test_prog/package.ini index ff4b70d..bfcd472 100644 --- a/tests/test_prog/package.ini +++ b/tests/test_prog/package.ini @@ -5,6 +5,8 @@ tags=test,game maintainer=John Doe (http://www.example.com/~jdoe), Spider-Man more_contributors=Riri , Fifi (http://www.example.com/~fifi), Loulou license=Apache-2.0 +[source] +exclude=game/excluded.nit:game/excluded_dir [upstream] browse=https://github.com/nitlang/nit/tree/master/tests/test_prog git=https://github.com/nitlang/nit.git -- 1.7.9.5