@@ -151,6 +151,15 @@ def test_issue_836(self):
151
151
seen = False
152
152
self .assertTrue (seen )
153
153
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
+
154
163
def test_issue_1054 (self ):
155
164
"""When run on Python 3, the 'supervisorctl avail' command
156
165
should work."""
@@ -320,7 +329,7 @@ def test_issue_1298(self):
320
329
self .addCleanup (bash .kill , signal .SIGINT )
321
330
bash .expect ('spewage 2' , timeout = 30 )
322
331
323
- def test_issue_1481_pidproxy_cmd_with_no_args (self ):
332
+ def test_issue_1418_pidproxy_cmd_with_no_args (self ):
324
333
"""When pidproxy is given a command to run that has no arguments, it
325
334
runs that command."""
326
335
args = ['-m' , 'supervisor.pidproxy' , 'nonexistent-pidfile' , "/bin/echo" ]
@@ -329,7 +338,7 @@ def test_issue_1481_pidproxy_cmd_with_no_args(self):
329
338
pidproxy .expect (pexpect .EOF )
330
339
self .assertEqual (pidproxy .before .strip (), "" )
331
340
332
- def test_issue_1481_pidproxy_cmd_with_args (self ):
341
+ def test_issue_1418_pidproxy_cmd_with_args (self ):
333
342
"""When pidproxy is given a command to run that has arguments, it
334
343
runs that command."""
335
344
args = ['-m' , 'supervisor.pidproxy' , 'nonexistent-pidfile' , "/bin/echo" , "1" , "2" ]
@@ -338,6 +347,7 @@ def test_issue_1481_pidproxy_cmd_with_args(self):
338
347
pidproxy .expect (pexpect .EOF )
339
348
self .assertEqual (pidproxy .before .strip (), "1 2" )
340
349
350
+
341
351
def test_suite ():
342
352
return unittest .findTestCases (sys .modules [__name__ ])
343
353
0 commit comments