From 820fae1ae05bf802d6b72a38ee19318711589381 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Sat, 14 Jan 2023 14:24:53 +0300 Subject: [PATCH] chore: add tests --- .github/workflows/test.yml | 20 ++++++++++++++++++++ README.md | 8 ++++---- src/brush_test.v | 11 +++++++++++ 3 files changed, 35 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 src/brush_test.v diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..89d8e22 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,20 @@ +name: Test + +on: + - pull_request + - push + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Set Up V + uses: vlang/setup-v@v1.1 + with: + check-latest: true + + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Test + run: v test ./ diff --git a/README.md b/README.md index cf7d2a9..0a3d206 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,9 @@ Here are some examples to get you started: ```v oksyntax import rgbcube.color -color.red.println('Hello World') -color.cyan.println_bg('Hello World') -color.bold.println('Hello World') +color.red.println('Hello, World!') +color.cyan.println_bg('Hello, World!') +color.bold.println('Hello, World!') ``` ### Advanced @@ -49,7 +49,7 @@ brush := color.new_brush( styles: [color.bold, color.underline, color.italic] ) -brush.println('Hello World') +brush.println('Hello, World!') ``` ## License diff --git a/src/brush_test.v b/src/brush_test.v new file mode 100644 index 0000000..d632392 --- /dev/null +++ b/src/brush_test.v @@ -0,0 +1,11 @@ +module color + +fn test_brush() { + brush := new_brush( + fg: bright_white + bg: bright_red + styles: [bold, underline] + ) + + brush.println('Hello, World!') +}