Commit Graph

10 Commits

Author SHA1 Message Date
Jordan Harband
14d01c6877 [Tests] add try/try_err helpers; convert tests to use them
Add `try` and `try_err` helper functions to `test/common.sh` that capture stdout/stderr and exit code from a single invocation, eliminating duplicate command executions in tests.
Convert all existing tests that used the `OUTPUT`/`EXIT_CODE` double-invocation pattern to use the new helpers.
Also fixes a pre-existing bug in the `nvm_die_on_prefix` test where ASCII apostrophes were used instead of U+2019 to match nvm.sh output.
2026-03-13 15:26:07 -04:00
Jordan Harband
e597bb208e [Tests] use a better JSON parsing implementation 2024-06-10 11:33:12 -07:00
Jordan Harband
29dce5edfd [New] allow .nvmrc files to support comments
In theory, `npx nvmrc` can now be used to validate an `.nvmrc` file that `nvm` will support. Allowances have been made for future extensibility, and aliases may no longer contain a `#`.

Fixes #3336. Closes #2288.

Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: Yash Singh <saiansh2525@gmail.com>
2024-06-07 10:13:00 -07:00
Jordan Harband
2a5d2c06ff [Tests] add more checks to make_fake_* helpers 2019-02-23 15:24:02 -08:00
Jordan Harband
48196d2436 [Tests] fix fake node versions 2019-02-23 14:47:49 -08:00
Jordan Harband
32a1b4124c Use watch to keepalive stdout while installing. 2016-09-02 23:43:47 -07:00
Jordan Harband
88ce2103f5 Use watch to keepalive stdout while installing. 2016-09-02 23:43:46 -07:00
Jordan Harband
186eb8838d [Tests] make “nvm use iojs” test actually test that thing. 2016-07-07 15:38:34 -07:00
Jordan Harband
379d079c30 [Tests] Ensure color codes are stripped in alias tests. 2016-04-27 17:05:33 -07:00
Julien Gilli
2d692d9d78 Fix support for installing node on SmartOS
uname on SmartOS cannot be used to guess if 32 and/or 64 bits binaries
are supported, and its output is different than other uname commands on
other operating systems.

This change uses pkg_info to determine what types of binaries pkgsrc
would install. If pkg_info fails to run or is not present, this change
falls back to using isainfo -n, which determines what the kernel
supports.

It allows users to install node binaries on Solaris derivatives. io.js
can also be installed on Solaris derivatives starting with version
v3.3.1.
2015-09-30 22:10:29 -07:00