1
0
Fork 0
pull/1580/head
JoannaaKL 2023-11-09 13:27:14 +00:00 committed by GitHub
parent 30dbb496d3
commit e0eab1f58d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 4 deletions

View File

@ -169,11 +169,20 @@ describe('@actions/core', () => {
}) })
it('setSecret produces the correct command 2', () => { it('setSecret produces the correct command 2', () => {
core.setSecret('%xxx') core.setSecret('secret val %')
core.setSecret('%25') core.setSecret('multi\nline\r\nsecret')
assertWriteCalls([ assertWriteCalls([
`::add-mask::%25xxx`, `::add-mask::secret val %25${os.EOL}`,
`::add-mask::%2525` `::add-mask::multi%0Aline%0D%0Asecret${os.EOL}`
])
})
it('setSecret produces the correct command 3', () => {
core.setSecret('secret val %25')
core.setSecret('multi\nline\r\nsecret')
assertWriteCalls([
`::add-mask::secret val %2525${os.EOL}`,
`::add-mask::multi%0Aline%0D%0Asecret${os.EOL}`
]) ])
}) })