Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/is-ssh/test/ drwxr-xr-x | |
| Viewing file: Select action/file-type: "use strict";
// Dependencies
var isSsh = require("../lib"),
tester = require("tester");
// Prepare the input data
var input = [
// Secure Shell Transport Protocol (SSH)
["ssh://user@host.xz:port/path/to/repo.git/", true], ["ssh://user@host.xz/path/to/repo.git/", true], ["ssh://host.xz:port/path/to/repo.git/", true], ["ssh://host.xz/path/to/repo.git/", true], ["ssh://user@host.xz/path/to/repo.git/", true], ["ssh://host.xz/path/to/repo.git/", true], ["ssh://user@host.xz/~user/path/to/repo.git/", true], ["ssh://host.xz/~user/path/to/repo.git/", true], ["ssh://user@host.xz/~/path/to/repo.git", true], ["ssh://host.xz/~/path/to/repo.git", true], ["user@host.xz:/path/to/repo.git/", true], ["user@host.xz:~user/path/to/repo.git/", true], ["user@host.xz:path/to/repo.git", true], ["host.xz:/path/to/repo.git/", true], ["host.xz:path/to/repo.git", true], ["host.xz:~user/path/to/repo.git/", true], ["rsync://host.xz/path/to/repo.git/", true]
// Git Transport Protocol
, ["git://host.xz/path/to/repo.git/", false], ["git://host.xz/~user/path/to/repo.git/", false]
// HTTP/S Transport Protocol
, ["http://host.xz/path/to/repo.git/", false], ["https://host.xz/path/to/repo.git/", false], ["http://host.xz:8000/path/to/repo.git/", false], ["https://host.xz:8000/path/to/repo.git/", false]
// Local (Filesystem) Transport Protocol
, ["/path/to/repo.git/", false], ["path/to/repo.git/", false], ["~/path/to/repo.git", false], ["file:///path/to/repo.git/", false], ["file://~/path/to/repo.git/", false]];
tester.describe("check urls", function (test) {
// Run the tests
input.forEach(function (c) {
test.it(c[0] + " is supposed " + (!c[1] ? "not " : "") + "to be a ssh url", function () {
test.expect(isSsh(c[0])).toBe(c[1]);
});
});
}); |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0287 ]-- |