Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

645 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { resolveTerminalFileUrlTarget } from './terminal-file-url-target'

describe('resolveTerminalFileUrlTarget', () => {
  it('resolves UNC file URLs with line and column anchors', () => {
    expect(
      resolveTerminalFileUrlTarget(new URL('file://Server/Share/Repo/src/app.ts#L12C3'), {
        allowUncHost: true
      })
    ).toEqual({
      filePath: '//server/Share/Repo/src/app.ts',
      line: 12,
      column: 3
    })
  })

  it('returns null for malformed file URL escapes', () => {
    expect(resolveTerminalFileUrlTarget(new URL('file:///tmp/%E0%A4%A.txt'))).toBeNull()
  })
})