Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
tests.js152 linesDownload Raw Back to test
1var urljoin = require('../lib/url-join');2var assert = require('assert');3 4describe('url join', function () {5  it('should work for simple case', function () {6    urljoin('http://www.google.com/', 'foo/bar', '?test=123')7      .should.eql('http://www.google.com/foo/bar?test=123');8  });9 10  it('should work for simple case with new syntax', function () {11    urljoin(['http://www.google.com/', 'foo/bar', '?test=123'])12      .should.eql('http://www.google.com/foo/bar?test=123');13  });14 15  it('should work for hashbang urls', function () {16    urljoin(['http://www.google.com', '#!', 'foo/bar', '?test=123'])17      .should.eql('http://www.google.com/#!/foo/bar?test=123');18  });19 20  it('should be able to join protocol', function () {21    urljoin('http:', 'www.google.com/', 'foo/bar', '?test=123')22      .should.eql('http://www.google.com/foo/bar?test=123');23  });24 25  it('should be able to join protocol with slashes', function () {26    urljoin('http://', 'www.google.com/', 'foo/bar', '?test=123')27      .should.eql('http://www.google.com/foo/bar?test=123');28  });29 30  it('should remove extra slashes', function () {31    urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123')32      .should.eql('http://www.google.com/foo/bar?test=123');33  });34 35  it('should not remove extra slashes in an encoded URL', function () {36    urljoin('http:', 'www.google.com///', 'foo/bar', '?url=http%3A//Ftest.com')37      .should.eql('http://www.google.com/foo/bar?url=http%3A//Ftest.com');38 39    urljoin('http://a.com/23d04b3/', '/b/c.html')40      .should.eql('http://a.com/23d04b3/b/c.html')41      .should.not.eql('http://a.com/23d04b3//b/c.html');42  });43 44  it('should support anchors in urls', function () {45    urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123', '#faaaaa')46      .should.eql('http://www.google.com/foo/bar?test=123#faaaaa');47  });48 49  it('should support protocol-relative urls', function () {50    urljoin('//www.google.com', 'foo/bar', '?test=123')51      .should.eql('//www.google.com/foo/bar?test=123')52  });53 54  it('should support file protocol urls', function () {55    urljoin('file:/', 'android_asset', 'foo/bar')56      .should.eql('file://android_asset/foo/bar')57 58    urljoin('file:', '/android_asset', 'foo/bar')59      .should.eql('file://android_asset/foo/bar')60  });61 62  it('should support absolute file protocol urls', function () {63    urljoin('file:', '///android_asset', 'foo/bar')64      .should.eql('file:///android_asset/foo/bar')65 66    urljoin('file:///', 'android_asset', 'foo/bar')67      .should.eql('file:///android_asset/foo/bar')68 69    urljoin('file:///', '//android_asset', 'foo/bar')70      .should.eql('file:///android_asset/foo/bar')71 72    urljoin('file:///android_asset', 'foo/bar')73      .should.eql('file:///android_asset/foo/bar')74  });75 76  it('should merge multiple query params properly', function () {77    urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123', '?key=456')78      .should.eql('http://www.google.com/foo/bar?test=123&key=456');79 80    urljoin('http:', 'www.google.com///', 'foo/bar', '?test=123', '?boom=value', '&key=456')81      .should.eql('http://www.google.com/foo/bar?test=123&boom=value&key=456');82 83    urljoin('http://example.org/x', '?a=1', '?b=2', '?c=3', '?d=4')84      .should.eql('http://example.org/x?a=1&b=2&c=3&d=4');85  });86 87  it('should merge slashes in paths correctly', function () {88    urljoin('http://example.org', 'a//', 'b//', 'A//', 'B//')89      .should.eql('http://example.org/a/b/A/B/');90  });91 92  it('should merge colons in paths correctly', function () {93    urljoin('http://example.org/', ':foo:', 'bar')94      .should.eql('http://example.org/:foo:/bar');95  });96 97  it('should merge just a simple path without URL correctly', function() {98    urljoin('/', 'test')99      .should.eql('/test');100  });101 102  it('should fail with segments that are not string', function() {103    assert.throws(() => urljoin(true),104                  /Url must be a string. Received true/);105    assert.throws(() => urljoin('http://blabla.com/', 1),106                  /Url must be a string. Received 1/);107    assert.throws(() => urljoin('http://blabla.com/', undefined, 'test'),108                  /Url must be a string. Received undefined/);109    assert.throws(() => urljoin('http://blabla.com/', null, 'test'),110                  /Url must be a string. Received null/);111    assert.throws(() => urljoin('http://blabla.com/', { foo: 123 }, 'test'),112                  /Url must be a string. Received \[object Object\]/);113  });114 115  it('should merge a path with colon properly', function(){116    urljoin('/users/:userId', '/cars/:carId')117      .should.eql('/users/:userId/cars/:carId');118  });119 120  it('should merge slashes in protocol correctly', function () {121    urljoin('http://example.org', 'a')122      .should.eql('http://example.org/a');123    urljoin('http:', '//example.org', 'a')124      .should.eql('http://example.org/a');125    urljoin('http:///example.org', 'a')126      .should.eql('http://example.org/a');127    urljoin('file:///example.org', 'a')128      .should.eql('file:///example.org/a');129 130    urljoin('file:example.org', 'a')131      .should.eql('file://example.org/a');132 133    urljoin('file:/', 'example.org', 'a')134      .should.eql('file://example.org/a');135    urljoin('file:', '/example.org', 'a')136      .should.eql('file://example.org/a');137    urljoin('file:', '//example.org', 'a')138      .should.eql('file://example.org/a');139  });140 141  it('should skip empty strings', function() {142    urljoin('http://foobar.com', '', 'test')143      .should.eql('http://foobar.com/test');144    urljoin('', 'http://foobar.com', '', 'test')145      .should.eql('http://foobar.com/test');146  });147 148  it('should return an empty string if no arguments are supplied', function() {149    urljoin().should.eql('');150  });151});152 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai