Kaynağa Gözat

default view format changed

avkonst 11 yıl önce
ebeveyn
işleme
3c619bcd4e

+ 1 - 1
mainline/ext/std/tools/view.py

@@ -25,7 +25,7 @@ import mpp.cout
 class Plugin(mpp.api.Plugin, mpp.api.IConfigurable, mpp.api.IRunable):
     
     def declare_configuration(self, parser):
-        parser.add_option("--format", "--ft", default='xml', choices=['txt', 'xml', 'python'], help="Format of the output data. "
+        parser.add_option("--format", "--ft", default='txt', choices=['txt', 'xml', 'python'], help="Format of the output data. "
                           "Possible values are 'xml', 'txt' or 'python' [default: %default]")
         parser.add_option("--nest-regions", "--nr", action="store_true", default=False,
                           help="If the option is set (True), data for regions is exported in the form of a tree. "

+ 1 - 1
mainline/tests/general/test_basic/test_help_view_default_stdout.gold.txt

@@ -18,7 +18,7 @@ Options:
                         'METRIXPLUSPLUS_LOG_LEVEL' if set. [default: INFO]
   --format=FORMAT, --ft=FORMAT
                         Format of the output data. Possible values are 'xml',
-                        'txt' or 'python' [default: xml]
+                        'txt' or 'python' [default: txt]
   --nest-regions, --nr  If the option is set (True), data for regions is
                         exported in the form of a tree. Otherwise, all regions
                         are exported in plain list. [default: False]

+ 2 - 2
mainline/tests/general/test_std_code_cpp.py

@@ -30,11 +30,11 @@ class Test(tests.common.TestCase):
         runner = tests.common.ToolRunner('collect', ['--std.code.complexity.cyclomatic'])
         self.assertExec(runner.run())
 
-        runner = tests.common.ToolRunner('view')
+        runner = tests.common.ToolRunner('view', opts_list=['--format=xml'])
         self.assertExec(runner.run())
         
         dirs_list = [os.path.join('.', each) for each in os.listdir(self.get_content_paths().cwd)]
-        runner = tests.common.ToolRunner('view', opts_list=['--format=txt'], dirs_list=dirs_list, prefix='files')
+        runner = tests.common.ToolRunner('view', dirs_list=dirs_list, prefix='files')
         self.assertExec(runner.run())
 
         runner = tests.common.ToolRunner('limit',