mirror of
https://github.com/daylinmorgan/hwylterm.git
synced 2025-02-23 09:45:50 -06:00
fix gitignores
This commit is contained in:
parent
49b8e94bb7
commit
50d0ee5a3b
8 changed files with 74 additions and 7 deletions
9
tests/.gitignore
vendored
9
tests/.gitignore
vendored
|
@ -1,4 +1,7 @@
|
||||||
|
# Ignore all files without extensions in any directory
|
||||||
*
|
*
|
||||||
!*.nim
|
!*/
|
||||||
!*.nims
|
!*.*
|
||||||
!cli/
|
|
||||||
|
# Don't ignore .gitignore file
|
||||||
|
!.gitignore
|
||||||
|
|
4
tests/cli/.gitignore
vendored
4
tests/cli/.gitignore
vendored
|
@ -1,4 +0,0 @@
|
||||||
*
|
|
||||||
!refs/*
|
|
||||||
!*.nim
|
|
||||||
!*.nims
|
|
1
tests/cli/clis/config.nims
Normal file
1
tests/cli/clis/config.nims
Normal file
|
@ -0,0 +1 @@
|
||||||
|
switch("path", "$projectDir/../../../src")
|
17
tests/cli/clis/enumFlag.nim
Normal file
17
tests/cli/clis/enumFlag.nim
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import std/[strformat]
|
||||||
|
import hwylterm, hwylterm/hwylcli
|
||||||
|
|
||||||
|
type
|
||||||
|
Color = enum
|
||||||
|
red, blue, green
|
||||||
|
|
||||||
|
# TODO: color should be a required flag by default?
|
||||||
|
|
||||||
|
hwylCli:
|
||||||
|
name "enumFlag"
|
||||||
|
flags:
|
||||||
|
color:
|
||||||
|
T Color
|
||||||
|
run:
|
||||||
|
echo fmt"{color=}"
|
||||||
|
assert args.len == 0
|
12
tests/cli/clis/posFirst.nim
Normal file
12
tests/cli/clis/posFirst.nim
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import std/[strformat]
|
||||||
|
import hwylterm, hwylterm/hwylcli
|
||||||
|
|
||||||
|
hwylCli:
|
||||||
|
name "positionals"
|
||||||
|
args:
|
||||||
|
first seq[string]
|
||||||
|
second string
|
||||||
|
third string
|
||||||
|
run:
|
||||||
|
echo fmt"{first=}, {second=}, {third=}"
|
||||||
|
echo fmt"{args=}"
|
12
tests/cli/clis/posLast.nim
Normal file
12
tests/cli/clis/posLast.nim
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
import std/[strformat]
|
||||||
|
import hwylterm, hwylterm/hwylcli
|
||||||
|
|
||||||
|
hwylCli:
|
||||||
|
name "posLast"
|
||||||
|
args:
|
||||||
|
first string
|
||||||
|
second string
|
||||||
|
third seq[string]
|
||||||
|
run:
|
||||||
|
echo fmt"{first=}, {second=}, {third=}"
|
||||||
|
assert args.len == 0
|
13
tests/cli/clis/posLastExact.nim
Normal file
13
tests/cli/clis/posLastExact.nim
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import std/[strformat]
|
||||||
|
import hwylterm, hwylterm/hwylcli
|
||||||
|
|
||||||
|
hwylCli:
|
||||||
|
name "posLast"
|
||||||
|
settings: ExactArgs
|
||||||
|
args:
|
||||||
|
first string
|
||||||
|
second string
|
||||||
|
third seq[string]
|
||||||
|
run:
|
||||||
|
echo fmt"{first=}, {second=}, {third=}"
|
||||||
|
assert args.len == 0
|
13
tests/cli/clis/posNoMulti.nim
Normal file
13
tests/cli/clis/posNoMulti.nim
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import std/[strformat]
|
||||||
|
import hwylterm, hwylterm/hwylcli
|
||||||
|
|
||||||
|
hwylCli:
|
||||||
|
name "positionals"
|
||||||
|
settings: ExactArgs
|
||||||
|
args:
|
||||||
|
first int
|
||||||
|
second string
|
||||||
|
third string
|
||||||
|
run:
|
||||||
|
echo fmt"{first=}, {second=}, {third=}"
|
||||||
|
assert args.len == 0
|
Loading…
Add table
Reference in a new issue