Skip to content

Commit 651e9fe

Browse files
Test external script registration (#297)
1 parent 5093b1d commit 651e9fe

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/test.py

+12
Original file line numberDiff line numberDiff line change
@@ -1142,6 +1142,10 @@ def setUp(self):
11421142
sh.run_command('complete -r python python2 python3')
11431143
output = sh.run_command(self.install_cmd)
11441144
self.assertEqual(output, '')
1145+
# Register a dummy completion with an external argcomplete script
1146+
# to ensure this doesn't overwrite our previous registration.
1147+
output = sh.run_command('eval "$(register-python-argcomplete dummy --external-argcomplete-script dummy)"')
1148+
self.assertEqual(output, '')
11451149
self.sh = sh
11461150

11471151
def test_one_space_after_exact(self):
@@ -1250,6 +1254,10 @@ def setUp(self):
12501254
# by passing 'prog' as the second argument.
12511255
output = sh.run_command('eval `register-python-argcomplete --shell tcsh dummy prog`')
12521256
self.assertEqual(output, '')
1257+
# Register a dummy completion with an external argcomplete script
1258+
# to ensure this doesn't overwrite our previous registration.
1259+
output = sh.run_command('eval `register-python-argcomplete --shell tcsh dummy --external-argcomplete-script dummy`')
1260+
self.assertEqual(output, '')
12531261
self.sh = sh
12541262

12551263
def tearDown(self):
@@ -1285,6 +1293,10 @@ def setUp(self):
12851293
# by passing 'prog' as the second argument.
12861294
output = sh.run_command('register-python-argcomplete --shell fish dummy prog | .')
12871295
self.assertEqual(output, '')
1296+
# Register a dummy completion with an external argcomplete script
1297+
# to ensure this doesn't overwrite our previous registration.
1298+
output = sh.run_command('register-python-argcomplete --shell fish dummy --external-argcomplete-script dummy | .')
1299+
self.assertEqual(output, '')
12881300
self.sh = sh
12891301

12901302
def tearDown(self):

0 commit comments

Comments
 (0)