tests: add test for source.exclude ini entry
authorJean Privat <jean@pryen.org>
Sat, 4 Jun 2016 15:06:07 +0000 (11:06 -0400)
committerJean Privat <jean@pryen.org>
Sat, 4 Jun 2016 18:10:13 +0000 (14:10 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/nitls.args
tests/nitpick.args
tests/sav/nitdoc_args4.res
tests/sav/nitls_args7.res [new file with mode: 0644]
tests/sav/nitls_args8.res [new file with mode: 0644]
tests/sav/test_neo_args1.res
tests/sav/test_sort_perf_args1.res
tests/test_prog/game/excluded.nit [new file with mode: 0644]
tests/test_prog/game/excluded_dir/more.nit [new file with mode: 0644]
tests/test_prog/package.ini

index 568f76a..e79a1e1 100644 (file)
@@ -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
index 396ac26..1ef81d1 100644 (file)
@@ -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
index 01782ba..9238b51 100644 (file)
@@ -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 (file)
index 0000000..a0a686e
--- /dev/null
@@ -0,0 +1,12 @@
+test_prog: Test program for model tools. (test_prog)
+|--game: Gaming group (test_prog/game)
+|  `--\e[1mgame\e[m: A game abstraction for RPG. (test_prog/game/game.nit)
+|--platform: Fictive Crappy Platform. (test_prog/platform)
+|  `--\e[1mplatform\e[m: Declares base types allowed on the platform. (test_prog/platform/platform.nit)
+|--rpg: Role Playing Game group (test_prog/rpg)
+|  |--\e[1mcareers\e[m: Careers of the game. (test_prog/rpg/careers.nit)
+|  |--\e[1mcharacter\e[m: Characters are playable entity in the world. (test_prog/rpg/character.nit)
+|  |--\e[1mcombat\e[m: COmbat interactions between characters. (test_prog/rpg/combat.nit)
+|  |--\e[1mraces\e[m: Races of the game. (test_prog/rpg/races.nit)
+|  `--\e[1mrpg\e[m: A worlg RPG abstraction. (test_prog/rpg/rpg.nit)
+`--\e[1mtest_prog\e[m: 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 (file)
index 0000000..b80e7ce
--- /dev/null
@@ -0,0 +1,2 @@
+\e[1mexcluded\e[m (test_prog/game/excluded.nit)
+\e[1mmore\e[m (test_prog/game/excluded_dir/more.nit)
index 4ac86da..fdc3be7 100644 (file)
@@ -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
index 01532de..b1fe714 100644 (file)
@@ -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 (file)
index 0000000..d296d4b
--- /dev/null
@@ -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 (file)
index 0000000..d296d4b
--- /dev/null
@@ -0,0 +1 @@
+This is not a valid Nit program
index ff4b70d..bfcd472 100644 (file)
@@ -5,6 +5,8 @@ tags=test,game
 maintainer=John Doe <jdoe@example.com> (http://www.example.com/~jdoe), Spider-Man
 more_contributors=Riri <riri@example.com>, 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