mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-07 19:53:16 +08:00
actions/toolkit#127: getInput supports variables with multiple spaces (#129)
* actions/toolkit#127: getInput supports variables with multiple spaces * actions/toolkit#127: PR comment, update changelog
This commit is contained in:
committed by
Danny McCormick
parent
b297969f56
commit
6fcaac5046
@@ -16,7 +16,8 @@ const testEnvVars = {
|
||||
// Set inputs
|
||||
INPUT_MY_INPUT: 'val',
|
||||
INPUT_MISSING: '',
|
||||
'INPUT_SPECIAL_CHARS_\'\t"\\': '\'\t"\\ response '
|
||||
'INPUT_SPECIAL_CHARS_\'\t"\\': '\'\t"\\ response ',
|
||||
INPUT_MULTIPLE_SPACES_VARIABLE: 'I have multiple spaces'
|
||||
}
|
||||
|
||||
describe('@actions/core', () => {
|
||||
@@ -113,6 +114,12 @@ describe('@actions/core', () => {
|
||||
expect(core.getInput('special chars_\'\t"\\')).toBe('\'\t"\\ response')
|
||||
})
|
||||
|
||||
it('getInput handles multiple spaces', () => {
|
||||
expect(core.getInput('multiple spaces variable')).toBe(
|
||||
'I have multiple spaces'
|
||||
)
|
||||
})
|
||||
|
||||
it('setOutput produces the correct command', () => {
|
||||
core.setOutput('some output', 'some value')
|
||||
assertWriteCalls([`::set-output name=some output,::some value${os.EOL}`])
|
||||
|
||||
Reference in New Issue
Block a user