Commits

Anonymous committed 0cd1cbd

ignoring trailing colon in batchset config names

Comments (0)

Files changed (3)

 
   goal ${project}.pycore.create_module(${project}.root, ${name})
 
-  checks
+  args
    create_module: name=rope.contrib.generate.create_module
    project: type=rope.base.project.Project
 

ropemacs/dialog.py

         elif response == 'batchset':
             sets = askdata(batchset_question)
             for key, value in _parse_batchset(sets).items():
+                if key.endswith(':'):
+                    key = key[:-1]
                 result[key] = value
         elif response in actions:
             break
         self.assertEquals({'name': 'value'}, result)
         self.assertEquals('done', action)
 
+    def test_ignoring_trailing_colon_in_config_names(self):
+        optionals = {'name1': dialog.Data()}
+        minibuffer = _MockAskConfig(
+            ['batchset', 'name1: value1\n', 'done'])
+        action, result = dialog.show_dialog(minibuffer, ['done', 'cancel'],
+                                            optionals=optionals)
+        self.assertEquals({'name1': 'value1'}, result)
+        self.assertEquals('done', action)
+
 
 class _MockAskConfig(object):