From a4f43d9cbe057f58a7743efc643c58638f7ff4c9 Mon Sep 17 00:00:00 2001 From: Remy Suen Date: Sat, 19 May 2018 09:17:20 -0400 Subject: [PATCH] Fix #36 Add some extra tests Signed-off-by: Remy Suen --- test/dockerValidator.test.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/dockerValidator.test.ts b/test/dockerValidator.test.ts index 3789444..13a749b 100644 --- a/test/dockerValidator.test.ts +++ b/test/dockerValidator.test.ts @@ -1806,11 +1806,17 @@ describe("Docker Validator Tests", function() { let diagnostics = validateDockerfile("FROM node\nARG AAA=${aaa:-'bbb'}"); assert.equal(diagnostics.length, 0); + diagnostics = validateDockerfile("FROM node\nARG AAA=${aaa:-'bbb ccc'}"); + assert.equal(diagnostics.length, 0); + diagnostics = validateDockerfile("FROM node\nARG AAA=${aaa:-\"bbb\""); assert.equal(diagnostics.length, 0); diagnostics = validateDockerfile("FROM node\nARG AAA=${aaa:-\"bbb\"}"); assert.equal(diagnostics.length, 0); + + diagnostics = validateDockerfile("FROM node\nARG AAA=${aaa:-\"bbb ccc\"}"); + assert.equal(diagnostics.length, 0); }); it("escape", function() { @@ -2192,11 +2198,17 @@ describe("Docker Validator Tests", function() { diagnostics = validateDockerfile("FROM node\n" + instruction + " AAA=${aaa:-'bbb'}"); assert.equal(diagnostics.length, 0); + diagnostics = validateDockerfile("FROM node\n" + instruction + " AAA=${aaa:-'bbb ccc'}"); + assert.equal(diagnostics.length, 0); + diagnostics = validateDockerfile("FROM node\n" + instruction + " AAA=${aaa:-\"bbb\""); assert.equal(diagnostics.length, 0); diagnostics = validateDockerfile("FROM node\n" + instruction + " AAA=${aaa:-\"bbb\"}"); assert.equal(diagnostics.length, 0); + + diagnostics = validateDockerfile("FROM node\n" + instruction + " AAA=${aaa:-\"bbb ccc\"}"); + assert.equal(diagnostics.length, 0); }); it("requires two", function() {