spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

claude-code / mods / diff / tests / fixtures / scripted / unusual-names.ts
24 lines · 825 BRaw
1import { oneAddedOf } from './one-added-of.js'
2import type { PrintedFile } from './printed-file.js'
3
4/**
5 * Files whose names a parse of git's lines could mistake, in git's order,
6 * each opening as git prints it: quoted around a newline or a quote.
7 */
8export const UNUSUAL_NAMES: readonly PrintedFile[] = [
9 ['a b/x b', oneAddedOf('in a folder named a b')],
10 ['diff --git a b', oneAddedOf('named as an opening line')],
11 ['höher.txt', oneAddedOf('outside ASCII')],
12 [
13 'new\nline.txt',
14 oneAddedOf('a newline in the name'),
15 'diff --git "a/new\\nline.txt" "b/new\\nline.txt"',
16 ],
17 [
18 'quo"te.txt',
19 oneAddedOf('a quote in the name'),
20 'diff --git "a/quo\\"te.txt" "b/quo\\"te.txt"',
21 ],
22 ['with space.txt', oneAddedOf('a space in the name')],
23 ['x b/x.txt', oneAddedOf('b/ inside the name')],
24]