@@ -12,7 +12,7 @@ test.beforeEach(t => {
1212 t . context . logger = { log : t . context . log , error : t . context . error } ;
1313} ) ;
1414
15- test . serial ( 'Pipe script output to stdout and stderr' , async t => {
15+ test ( 'Pipe script output to stdout and stderr' , async t => {
1616 const pluginConfig = { cmd : '>&2 echo "write to stderr" && echo "write to stdout"' } ;
1717 const context = { stdout : t . context . stdout , stderr : t . context . stderr , logger : t . context . logger , options : { } } ;
1818
@@ -23,7 +23,7 @@ test.serial('Pipe script output to stdout and stderr', async t => {
2323 t . is ( t . context . stderr . getContentsAsString ( 'utf8' ) . trim ( ) , 'write to stderr' ) ;
2424} ) ;
2525
26- test . serial ( 'Generate command with template' , async t => {
26+ test ( 'Generate command with template' , async t => {
2727 const pluginConfig = { cmd : `./test/fixtures/echo-args.sh \${config.conf} \${lastRelease.version}` , conf : 'confValue' } ;
2828 const context = {
2929 stdout : t . context . stdout ,
@@ -35,3 +35,13 @@ test.serial('Generate command with template', async t => {
3535 const result = await execScript ( pluginConfig , context ) ;
3636 t . is ( result , 'confValue 1.0.0' ) ;
3737} ) ;
38+
39+ test ( 'Execute the script with the specified "shell"' , async t => {
40+ const context = { stdout : t . context . stdout , stderr : t . context . stderr , logger : t . context . logger } ;
41+
42+ let result = await execScript ( { cmd : 'echo $0' , shell : 'bash' } , context ) ;
43+ t . is ( result , 'bash' ) ;
44+
45+ result = await execScript ( { cmd : 'echo $0' , shell : 'sh' } , context ) ;
46+ t . is ( result , 'sh' ) ;
47+ } ) ;
0 commit comments