tuitest

(★ 11)

Headless testing harness for terminal programs: real PTY, VT emulator, deterministic waits, and golden screen snapshots

파일 탐색기

  • .gitignore
  • api_test.go
  • bench_test.go
  • encode_test.go
  • exitcode_test.go
  • fuzz_test.go
  • go.mod
  • go.sum
  • integration_test.go
  • keys.go
  • LICENSE
  • mouse.go
  • README.md
  • screen.go
  • snapshot.go
  • state.go
  • state_test.go
  • teardown_test.go
  • terminal.go
  • vtdiff_test.go
  • wait.go

# CDN으로 사용하기

jsDelivr

jsDelivr는 공개 GitHub 리포지토리를 별도 설정 없이 CDN으로 즉시 서빙합니다. 버전과 파일을 고르면 웹페이지에 바로 붙일 수 있는 링크와 예시 코드가 만들어집니다.

명령어 용어집

이 문서에서 사용된 명령어를 모아봤습니다. 낯선 명령어가 있다면 펼쳐서 확인해보세요.

🔍

Line

설명 보기 ▼

라인을 관리합니다.
설정 모드에서 사용함.
더 많은 정보: <https://www.cisco.com/c/en/us/td/docs/routers/sdwan/command/iosxe/qualified-cli-command-reference-guide/m-line-commands.pdf>.

line vty 0 15

0번부터 15번까지의 VTY 라인 설정:

line

Read input:

🔍

go build

설명 보기 ▼

Compile Go sources.

go build {{path/to/main.go}}

Compile a 'package main' file (output will be the filename without extension):

go build -o {{path/to/binary}} {{path/to/source.go}}

Compile, specifying the output filename:

go build -o {{path/to/binary}} {{path/to/package}}

Compile a package:

🔍

go get

설명 보기 ▼

Add a dependency package, or download packages in legacy GOPATH mode.
Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.

go get {{example.com/pkg}}

Add a specified package to `go.mod` in module-mode or install the package in GOPATH-mode:

go get {{example.com/pkg}}@{{v1.2.3}}

Modify the package with a given version in module-aware mode:

go get {{example.com/pkg}}@{{none}}

Remove a specified package:

🔍

go install

설명 보기 ▼

Compile and install packages named by the import paths.

go install

Compile and install the current package:

go install {{path/to/package}}

Compile and install a specific local package:

go install {{golang.org/x/tools/gopls}}@{{latest}}

Install the latest version of a program, ignoring `go.mod` in the current directory:

🔍

go test

설명 보기 ▼

Test Go packages (files have to end with `_test.go`).
Note: `./...` is a Go package pattern understood by Go tooling. It matches the current package and all packages recursively under the current directory.

go test

Test the package found in the current directory:

go test -v

[v]erbosely test the package in the current directory:

go test -v ./...

Test the packages in the current directory and all subdirectories:

🔍

go vet

설명 보기 ▼

Check Go source code and report suspicious constructs (e.g. lint your Go source files).
Go vet returns a non-zero exit code if problems are found; returns a zero exit code if no problems are found.

go vet

Check the Go package in the current directory:

go vet {{path/to/file_or_directory}}

Check the Go package in the specified path:

go tool vet help

List available checks that can be run with go vet:

🔍

kind

설명 보기 ▼

Docker 컨테이너 "노드"를 사용하여 로컬 Kubernetes 클러스터를 실행.
Kubernetes 자체 테스트를 위해 설계되었으나, 로컬 개발이나 지속적 통합에도 사용 가능.
더 많은 정보: <https://github.com/kubernetes-sigs/kind>.

kind create cluster --name {{cluster_name}}

로컬 Kubernetes 클러스터 생성:

kind delete clusters {{cluster_name}}

하나 이상의 클러스터 삭제:

kind get {{clusters|nodes|kubeconfig}}

클러스터, 노드 또는 kubeconfig에 대한 세부 정보 가져오기:

🔍

lazygit

설명 보기 ▼

Git 저장소 관리를 위한 간단한 터미널 UI.
더 많은 정보: <https://manned.org/lazygit>.

lazygit

현재 저장소에서 Lazygit 실행:

lazygit {{[-p|--path]}} {{path/to/repository}}

특정 Git 저장소에서 Lazygit 실행:

lazygit {{status|branch|log|stash|...}}

특정 패널에 포커스를 두고 Lazygit 시작:

🔍

regex

설명 보기 ▼

정규 표현식 (`regex`)은 텍스트에서 특정 패턴을 찾거나 일치시키고 조작하는 데 사용하는 표현식.
참고: `regex`는 명령이 아니라, 다른 명령에서 사용하는 문법 .
관련 항목: `egrep`, `glob`.
더 많은 정보: <https://cheatography.com/davechild/cheat-sheets/regular-expressions/>.

.

임의의 한 문자와 일치:

^{{hello}}

줄의 시작과 일치:

{{world}}$

줄의 끝과 일치:

🔍

Screen

설명 보기 ▼

원격 서버에서 세션을 열어 유지. 단일 SSH 연결로 여러 창을 관리.
관련 항목: `tmux`, `zellij`.
더 많은 정보: <https://manned.org/screen>.

screen

새 screen 세션 시작:

screen -S {{session_name}}

새 이름 지정 screen 세션 시작:

screen -dmLS {{session_name}} {{command}}

새로운 데몬을 시작하고 출력을 `screenlog.x`에 기록:

🔍

timeout

설명 보기 ▼

명령을 일정 시간 제한 내에서 실행.
더 많은 정보: <https://www.gnu.org/software/coreutils/manual/html_node/timeout-invocation.html>.

timeout 3s sleep 10

`sleep 10`을 실행하고 3초 후 종료:

timeout {{[-s|--signal]}} {{INT|HUP|KILL|...}} {{5s}} {{sleep 10}}

시간 제한이 만료되면 명령에 [s]ignal을 전송 (`TERM`이 기본, 모든 신호 목록은 `kill -l`):

timeout {{[-v|--verbose]}} {{0.5s|1m|1h|1d|...}} {{command}}

시간 초과 시 전송된 신호를 `stderr`에 [v]erbose 출력으로 표시:

🔍

vim

설명 보기 ▼

Vim (Vi IMproved)는 다양한 텍스트 조작을 위한 여러 모드를 제공하는 명령줄 텍스트 편집기입니다.
일반 모드에서 `<i>`를 눌러 삽입 모드로 진입합니다. `<Esc>`를 눌러 다시 일반 모드로 돌아가면 Vim 명령을 사용할 수 있습니다.
관련 항목: `vimdiff`, `vimtutor`, `nvim`, `gvim`.
더 많은 정보: <https://www.vim.org/>.

vim {{path/to/file}}

파일 열기:

vim +{{line_number}} {{path/to/file}}

지정한 줄 번호에서 파일 열기:

<:>help<Enter>

Vim 메뉴얼 보기:

🔍

expect

설명 보기 ▼

사용자 입력이 필요한 다른 프로그램과 상호작용하는 스크립트 실행기.
더 많은 정보: <https://manned.org/expect>.

expect {{path/to/file}}

파일에서 expect 스크립트 실행:

expect -c "{{commands}}"

지정된 expect 스크립트 실행:

expect -i

대화형 REPL 모드로 진입 (`exit` 또는 `<Ctrl d>`로 종료):

🔍

setsid

설명 보기 ▼

호출 프로세스가 프로세스 그룹 리더가 아닌 경우 새 세션에서 프로그램을 실행.
생성된 세션은 기본적으로 현재 터미널에 의해 제어되지 않음.
더 많은 정보: <https://manned.org/setsid>.

setsid {{program}}

새 세션에서 프로그램 실행:

setsid {{program}} > /dev/null 2>&1

결과 출력 및 오류를 무시하며 새 세션에서 프로그램 실행:

setsid {{[-f|--fork]}} {{program}}

새 프로세스를 생성하여 프로그램 실행:

🔍

snap

설명 보기 ▼

Manage the "snap" self-contained software packages.
Similar to what `apt` is for `.deb`.

snap find {{query}}

Search for a package:

snap install {{package}}

Install a package:

snap refresh {{package}}

Update a package:

# 프로젝트 배지

// repository documentation