From a66de943555e49fbb1b657cbe3c5b2c703ae507d Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 7 Apr 2023 13:55:08 -0700 Subject: [PATCH] [Tests] increase coverage --- test/parse.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/parse.js b/test/parse.js index 536ead5..60e6c8b 100644 --- a/test/parse.js +++ b/test/parse.js @@ -6,6 +6,17 @@ var parse = require('../').parse; test('parse shell commands', function (t) { t.same(parse(''), [], 'parses an empty string'); + t['throws']( + function () { parse('${}'); }, + Error, + 'empty substitution throws' + ); + t['throws']( + function () { parse('${'); }, + Error, + 'incomplete substitution throws' + ); + t.same(parse('a \'b\' "c"'), ['a', 'b', 'c']); t.same( parse('beep "boop" \'foo bar baz\' "it\'s \\"so\\" groovy"'),