How to use the extsprintf.fprintf function in extsprintf

To help you get started, we’ve selected a few extsprintf examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github joyent / manatee / test / tst.manateeAdmUsage.js View on Github external
/*
 * manateeAdmUsage.test.js: test invocations of the "manatee-adm" command
 * Just run this test directly with Node, not with nodeunit.  All manatee-adm
 * subcommands should be covered by a test case below.  This program will fail
 * if it finds a subcommand with no test cases.
 */

var assertplus = require('assert-plus');
var forkexec = require('forkexec');
var path = require('path');
var vasync = require('vasync');
var VError = require('verror');
var extsprintf = require('extsprintf');

var sprintf = extsprintf.sprintf;
var fprintf = extsprintf.fprintf;

/*
 * Test cases are configured with the "subcmds" object below, which specifies
 * two properties for each "manatee-adm" subcommand:
 *
 *     o the list of required arguments
 *
 *     o whether running the command with all required arguments is
 *       "destructive", by which we mean only that it makes any actual changes
 *       to a Manatee cluster
 *
 * Using this configuration, the test suite will invoke the subcommand several
 * times:
 *
 *     o For each required argument, the subcommand will be invoked once with
 *       that argument _missing_ but the other required arguments present.  The

extsprintf

extended POSIX-style sprintf

MIT
Latest version published 3 years ago

Package Health Score

71 / 100
Full package analysis

Similar packages