HEX
Server: nginx/1.18.0
System: Linux test-ipsremont 5.4.0-214-generic #234-Ubuntu SMP Fri Mar 14 23:50:27 UTC 2025 x86_64
User: ips (1000)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/design.system/node_modules/@microsoft/tsdoc/lib/parser/__tests__/TextRange.test.js.map
{"version":3,"file":"TextRange.test.js","sourceRoot":"","sources":["../../../src/parser/__tests__/TextRange.test.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,2DAA2D;AAE3D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,SAAS,aAAa,CAAC,SAAoB;IACzC,KAAK,IAAI,CAAC,GAAW,CAAC,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,GAAG,GAAG,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC;QACrD,6BAA6B;QAC7B,IAAM,CAAC,GAAW,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QAErF,yCAAyC;QACzC,IAAM,OAAO,GAAW,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;QAE5F,MAAM,CAA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,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACxD,aAAa,CAAC,SAAS,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC;AAEH,IAAI,CAAC,8BAA8B,EAAE;IACnC,4CAA4C;IAC5C,IAAM,SAAS,GAAc,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC1D,aAAa,CAAC,SAAS,CAAC,CAAC;AAC3B,CAAC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license.\r\n// See LICENSE in the project root for license information.\r\n\r\nimport { TextRange } from '../TextRange';\r\nimport { TestHelpers } from './TestHelpers';\r\n\r\nfunction matchSnapshot(textRange: TextRange): void {\r\n  for (let i: number = -1; i <= textRange.end + 1; ++i) {\r\n    // Show the current character\r\n    const c: string = TestHelpers.getEscaped(textRange.buffer.substr(Math.max(i, 0), 1));\r\n\r\n    // Show the next 10 characters of context\r\n    const context: string = TestHelpers.getEscaped(textRange.buffer.substr(Math.max(i, 0), 10));\r\n\r\n    expect({\r\n      c: c,\r\n      context: context,\r\n      i: i,\r\n      location: textRange.getLocation(i)\r\n    }).toMatchSnapshot();\r\n  }\r\n}\r\n\r\ntest('construction scenarios', () => {\r\n  const buffer: string = '0123456789';\r\n  const textRange: TextRange = TextRange.fromString(buffer);\r\n  expect(textRange.toString()).toEqual(buffer);\r\n\r\n  const subRange: TextRange = textRange.getNewRange(3, 6);\r\n  expect(subRange).toMatchSnapshot('subRange');\r\n});\r\n\r\ntest('getLocation() basic', () => {\r\n  const textRange: TextRange = TextRange.fromString(\r\n    [\r\n      'L1',\r\n      'L2',\r\n      '', // (line 3 is blank)\r\n      'L4',\r\n      'L5+CR\\rL5+CRLF\\r\\nL6+LFCR\\n\\rL7'\r\n    ].join('\\n')\r\n  );\r\n  matchSnapshot(textRange);\r\n});\r\n\r\ntest('getLocation() empty string', () => {\r\n  const textRange: TextRange = TextRange.fromString('');\r\n  matchSnapshot(textRange);\r\n});\r\n\r\ntest('getLocation() CR string', () => {\r\n  const textRange: TextRange = TextRange.fromString('\\r');\r\n  matchSnapshot(textRange);\r\n});\r\n\r\ntest('getLocation() LF string', () => {\r\n  const textRange: TextRange = TextRange.fromString('\\n');\r\n  matchSnapshot(textRange);\r\n});\r\n\r\ntest('getLocation() tab characters', () => {\r\n  // Tab character advances by only one column\r\n  const textRange: TextRange = TextRange.fromString('1\\t3');\r\n  matchSnapshot(textRange);\r\n});\r\n"]}