Merge: doc: fixed some typos and other misc. corrections
[nit.git] / src / doc / commands / tests / test_commands_parser.nit
index d97e281..f5d6699 100644 (file)
@@ -190,6 +190,14 @@ class TestCommandsParser
                assert cmd.results.as(not null).length == 9
        end
 
+       fun test_cmd_parser_ancestors_with_filter_match is test do
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
+               var cmd = parser.parse("ancestors: test_prog::Warrior | match: Object")
+               assert cmd isa CmdAncestors
+               assert parser.error == null
+               assert cmd.results.as(not null).length == 1
+       end
+
        # CmdSearch
 
        fun test_cmd_parser_search is test do
@@ -202,7 +210,7 @@ class TestCommandsParser
 
        fun test_cmd_parser_search_limit is test do
                var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
-               var cmd = parser.parse("search: Caracter | limit: 2")
+               var cmd = parser.parse("search: strength | limit: 2")
                assert cmd isa CmdSearch
                assert parser.error == null
                assert cmd.results.as(not null).length == 2
@@ -226,6 +234,14 @@ class TestCommandsParser
                assert cmd.results.as(not null).length == 2
        end
 
+       fun test_cmd_parser_with_filter_inherited is test do
+               var parser = new CommandParser(test_model, test_main, test_builder, test_catalog)
+               var cmd = parser.parse("defs: test_prog::TestGame | inherited: TestGame")
+               assert cmd isa CmdFeatures
+               assert parser.error == null
+               assert cmd.results.as(not null).length == 4
+       end
+
        # CmdLinearization
 
        fun test_cmd_parser_lin is test do