@@ -151,6 +151,15 @@ def test_issue_836(self):
151151 seen = False
152152 self .assertTrue (seen )
153153
154+ def test_issue_986_command_string_with_double_percent (self ):
155+ """A percent sign can be used in a command= string without being
156+ expanded if it is escaped by a second percent sign."""
157+ filename = pkg_resources .resource_filename (__name__ , 'fixtures/issue-986.conf' )
158+ args = ['-m' , 'supervisor.supervisord' , '-c' , filename ]
159+ supervisord = pexpect .spawn (sys .executable , args , encoding = 'utf-8' )
160+ self .addCleanup (supervisord .kill , signal .SIGINT )
161+ supervisord .expect_exact ('dhcrelay -d -q -a %h:%p %P -i Vlan1000 192.168.0.1' )
162+
154163 def test_issue_1054 (self ):
155164 """When run on Python 3, the 'supervisorctl avail' command
156165 should work."""
@@ -320,7 +329,7 @@ def test_issue_1298(self):
320329 self .addCleanup (bash .kill , signal .SIGINT )
321330 bash .expect ('spewage 2' , timeout = 30 )
322331
323- def test_issue_1481_pidproxy_cmd_with_no_args (self ):
332+ def test_issue_1418_pidproxy_cmd_with_no_args (self ):
324333 """When pidproxy is given a command to run that has no arguments, it
325334 runs that command."""
326335 args = ['-m' , 'supervisor.pidproxy' , 'nonexistent-pidfile' , "/bin/echo" ]
@@ -329,7 +338,7 @@ def test_issue_1481_pidproxy_cmd_with_no_args(self):
329338 pidproxy .expect (pexpect .EOF )
330339 self .assertEqual (pidproxy .before .strip (), "" )
331340
332- def test_issue_1481_pidproxy_cmd_with_args (self ):
341+ def test_issue_1418_pidproxy_cmd_with_args (self ):
333342 """When pidproxy is given a command to run that has arguments, it
334343 runs that command."""
335344 args = ['-m' , 'supervisor.pidproxy' , 'nonexistent-pidfile' , "/bin/echo" , "1" , "2" ]
@@ -338,6 +347,7 @@ def test_issue_1481_pidproxy_cmd_with_args(self):
338347 pidproxy .expect (pexpect .EOF )
339348 self .assertEqual (pidproxy .before .strip (), "1 2" )
340349
350+
341351def test_suite ():
342352 return unittest .findTestCases (sys .modules [__name__ ])
343353
0 commit comments