1
0
Fork 0
pull/1260/head
Sampark Sharma 2022-12-09 11:47:00 +00:00 committed by GitHub
parent 0c23c38c68
commit 0690c10515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 3 deletions

View File

@ -95,6 +95,7 @@ test('zstd extract tar with windows BSDtar', async () => {
expect(execMock).toHaveBeenCalledTimes(1) expect(execMock).toHaveBeenCalledTimes(1)
expect(execMock).toHaveBeenCalledWith( expect(execMock).toHaveBeenCalledWith(
[ [
'cmd /c "',
'zstd -d --long=30 -o', 'zstd -d --long=30 -o',
TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
@ -104,7 +105,8 @@ test('zstd extract tar with windows BSDtar', async () => {
TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
'-P', '-P',
'-C', '-C',
workspace?.replace(/\\/g, '/') workspace?.replace(/\\/g, '/'),
'"' // end cmd /c
].join(' ') ].join(' ')
) )
} }
@ -233,6 +235,7 @@ test('zstd create tar with windows BSDtar', async () => {
expect(execMock).toHaveBeenCalledTimes(1) expect(execMock).toHaveBeenCalledTimes(1)
expect(execMock).toHaveBeenCalledWith( expect(execMock).toHaveBeenCalledWith(
[ [
'cmd /c "',
`"${tarPath}"`, `"${tarPath}"`,
'--posix', '--posix',
'-cf', '-cf',
@ -247,7 +250,8 @@ test('zstd create tar with windows BSDtar', async () => {
'&&', '&&',
'zstd -T0 --long=30 -o', 'zstd -T0 --long=30 -o',
CacheFilename.Zstd.replace(/\\/g, '/'), CacheFilename.Zstd.replace(/\\/g, '/'),
TarFilename.replace(/\\/g, '/') TarFilename.replace(/\\/g, '/'),
'"' // end cmd /c
].join(' '), ].join(' '),
undefined, // args undefined, // args
{ {
@ -338,6 +342,7 @@ test('zstd list tar with windows BSDtar', async () => {
expect(execMock).toHaveBeenCalledTimes(1) expect(execMock).toHaveBeenCalledTimes(1)
expect(execMock).toHaveBeenCalledWith( expect(execMock).toHaveBeenCalledWith(
[ [
'cmd /c "',
'zstd -d --long=30 -o', 'zstd -d --long=30 -o',
TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), archivePath.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
@ -345,7 +350,8 @@ test('zstd list tar with windows BSDtar', async () => {
`"${tarPath}"`, `"${tarPath}"`,
'-tf', '-tf',
TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'), TarFilename.replace(new RegExp(`\\${path.sep}`, 'g'), '/'),
'-P' '-P',
'"' // end cmd /c
].join(' ') ].join(' ')
) )
} }