var assert = require("assert"); var exec = require("child_process").exec; var path = require("path"); var readFileSync = require("fs").readFileSync; describe("bin/uglifyjs with input file globs", function() { var uglifyjscmd = '"' + process.argv[0] + '" bin/uglifyjs'; it("bin/uglifyjs with one input file extension glob.", function(done) { var command = uglifyjscmd + ' "test/input/issue-1242/foo.*" -cm'; exec(command, function(err, stdout) { if (err) throw err; assert.strictEqual(stdout, 'function foo(o){print("Foo:",2*o)}var print=console.log.bind(console);\n'); done(); }); }); it("bin/uglifyjs with one input file name glob.", function(done) { var command = uglifyjscmd + ' "test/input/issue-1242/b*.es5" -cm'; exec(command, function(err, stdout) { if (err) throw err; assert.strictEqual(stdout, 'function bar(n){return 3*n}function baz(n){return n/2}\n'); done(); }); }); it("bin/uglifyjs with multiple input file globs.", function(done) { var command = uglifyjscmd + ' "test/input/issue-1242/???.es5" "test/input/issue-1242/*.js" -mc toplevel,passes=2'; exec(command, function(err, stdout) { if (err) throw err; assert.strictEqual(stdout, 'var print=console.log.bind(console);print("qux",9,6),print("Foo:",22);\n'); done(); }); }); it("should throw with non-matching glob string", function(done) { var command = uglifyjscmd + ' "test/input/issue-1242/blah.*"'; exec(command, function(err, stdout, stderr) { assert.ok(err); assert.ok(/^ERROR: ENOENT/.test(stderr)); done(); }); }); it('"?" in glob string should not match "/"', function(done) { var command = uglifyjscmd + ' "test/input?issue-1242/foo.*"'; exec(command, function(err, stdout, stderr) { assert.ok(err); assert.ok(/^ERROR: ENOENT/.test(stderr)); done(); }); }); it("should handle special characters in glob string", function(done) { var command = uglifyjscmd + ' "test/input/issue-1632/^{*}[???](*)+$.??" -cm'; exec(command, function(err, stdout) { if (err) throw err; assert.strictEqual(stdout, "console.log(x);\n"); done(); }); }); it("should handle array of glob strings - matching and otherwise", function(done) { var dir = "test/input/issue-1242"; var command = uglifyjscmd + ' "' + [ path.join(dir, "b*.es5"), path.join(dir, "z*.es5"), path.join(dir, "*.js") ].join('" "') + '"'; exec(command, function(err, stdout, stderr) { assert.ok(err); assert.ok(/^ERROR: ENOENT.*?z\*\.es5/.test(stderr)); done(); }); }); }); * gnu/package/openpgp.scm (rnp)[phases]{fixes}: Rename fixes to patch-tests, use search-input-file, and remove trailing #t. {check}: Respect tests?. [native-inputs]: Remove labels. [home-page]: Update URL. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jack Hill 2023-03-13gnu: rnp: Update to 0.16.2....* gnu/packages/openpgp.scm (rnp): Update to 0.16.2. [file-name]: Use git-file-name. [patches]: Remove. [arguments]: Disable downloading testing inputs in #:configure-flags. [phases]{fixes}: Remove functionality that is no longer needed. [native-inputs]: Replace googletest-source with googletest, remove python2. * gnu/packages/patches/rnp-add-version.cmake.patch, * gnu/packages/patches/rnp-disable-ruby-rnp-tests.patch, * gnu/packages/patches/rnp-unbundle-googletest.patch: Remove files. * gnu/local.mk (dist_patch_DATA): Remove them. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Jack Hill rted system. * doc/guix.texi (GNU Distribution): Add x86_64-gnu. Change-Id: I828159aedb3f66caba98e935083cc3682429f219 Janneke Nieuwenhuizen 2023-11-07build: Fix spelling in m4 macros....* m4/guix.m4 (GUIX_CHECK_GUILE_SSH): Fix spelling of parameter. (GUIX_CHECK_FILE_NAME_LIMITS): Fix spelling of maximum. Change-Id: I93c80441393622a4bc06daa475eee13874cca527 Efraim Flashner 2023-03-16build: Correct guix_system on musl libc distros....* m4/guix.m4 (GUIX_SYSTEM_TYPE): Add linux-musl* case. This prevents the macro from mis-parsing the host OS, which causes breakage when building from source. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Antero Mejr