From: Jeff Hostetler Date: Mon, 11 Jun 2018 12:16:44 GMT Subject: Re: [PATCH v8 2/2] json-writer: t0019: add perl unit test Message-ID: <9aeac3a6-ea04-a43e-3851-1083792dfb5d@jeffhostetler.com> In-Reply-To: On 6/7/2018 1:13 PM, Eric Sunshine wrote: > On Thu, Jun 7, 2018 at 10:12 AM, wrote: >> Test json-writer output using perl script. >> >> Signed-off-by: Jeff Hostetler >> --- >> diff --git a/t/t0019/parse_json.perl b/t/t0019/parse_json.perl >> @@ -0,0 +1,52 @@ >> +#!/usr/bin/perl >> +use strict; >> +use warnings; >> +use JSON; > > This new script is going to have to be protected by a prerequisite > since the JSON module is not part of the standard Perl installation, > thus will not necessarily be installed everywhere (it isn't on any of > my machines, for instance). Something like: > > test_lazy_prereq PERLJSON ' > perl -MJSON -e "exit 0" > ' > > which would be used like this: > > test_expect_success PERLJSON 'parse JSON using Perl' ' > ... > ' > will do. thanks! Jeff