���� JFIF �� � ( %"1"%)+...383,7(-.-
![]() Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.20 System : Linux st2.domain.com 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC 2020 x86_64 User : apache ( 48) PHP Version : 7.4.20 Disable Function : NONE Directory : /proc/self/root/lib/node_modules/forever/node_modules/prompt/test/ |
/* * macros.js: Test macros for prompt. * * (C) 2010, Nodejitsu Inc. * */ var assert = require('assert'), helpers = require('./helpers'), prompt = require('../lib/prompt'); exports.shouldConfirm = function (options, mixin) { var message = options.response.toString().replace(/\n/g, ''), messages = ["When using prompt", "the confirm() method"], context = {}, last = context; messages = messages.concat(options.messages || []); while (messages.length) { var text = messages.shift(); last[text] = {}; last = last[text]; } last['responding with ' + message] = { topic: function () { if(!mixin) prompt.confirm(options.prop, this.callback); else prompt.confirm(options.prop, mixin, this.callback); if (!Array.isArray(options.response)) { helpers.stdin.writeNextTick(options.response + '\n'); } else { helpers.stdin.writeSequence(options.response); } }, "should respond with true" : function(err, result) { assert.isNull(err); assert.isTrue(result); } } return context; }; exports.shouldNotConfirm = function (options) { var message = options.response.toString().replace(/\n/g, ''), messages = ["When using prompt", "the confirm() method"], context = {}, last = context; messages = messages.concat(options.messages || []); while (messages.length) { var text = messages.shift(); last[text] = {}; last = last[text]; } last['responding with ' + message] = { topic: function () { prompt.confirm(options.prop, this.callback); if (!Array.isArray(options.response)) { helpers.stdin.writeNextTick(options.response + '\n'); } else { helpers.stdin.writeSequence(options.response); } }, "should respond with false" : function(err, result) { assert.isNull(err); assert.isFalse(result); } }; return context; };