Smarter args parser and a few debug messages

This commit is contained in:
svartalf 2019-09-13 22:45:36 +03:00
parent de5e75cc84
commit 40cbaa365c
6 changed files with 27 additions and 15 deletions

View file

@ -1,8 +1,9 @@
import * as args from '../src/args'
import * as input from '../src/input'
const testEnvVars = {
INPUT_COMMAND: 'build',
INPUT_ARGS: '--release --target x86_64-unknown-linux-gnu --no-default-features --features unstable',
// There are few unnecessary spaces here to check that args parser works properly
INPUT_ARGS: ' --release --target x86_64-unknown-linux-gnu --no-default-features --features unstable ',
'INPUT_USE-CROSS': 'true',
INPUT_TOOLCHAIN: '+nightly'
}
@ -14,7 +15,7 @@ describe('actions-rs/check', () => {
})
it('Parses action input into cargo input', async () => {
const result = args.parse();
const result = input.parse();
expect(result.command).toBe('build');
expect(result.args).toStrictEqual([