From 4e391641eb2d91a9d900adefac9f0c13932246f5 Mon Sep 17 00:00:00 2001 From: Peter Urbak Date: Fri, 30 Jun 2023 00:31:52 +0200 Subject: [PATCH] Adds tests file b-examples.el and CI test script --- .github/workflows/b-tests.yml | 43 ++++++++++++++++++++++++++++++++ .gitignore | 3 +++ b.el | 2 ++ bin/docs.sh | 40 ++++++++++++++++++++++++++++++ bin/setup.sh | 21 ++++++++++++++++ bin/tests.sh | 46 +++++++++++++++++++++++++++++++++++ dev/b-examples.el | 21 ++++++++++++++++ 7 files changed, 176 insertions(+) create mode 100644 .github/workflows/b-tests.yml create mode 100755 bin/docs.sh create mode 100755 bin/setup.sh create mode 100755 bin/tests.sh create mode 100644 dev/b-examples.el diff --git a/.github/workflows/b-tests.yml b/.github/workflows/b-tests.yml new file mode 100644 index 0000000..0e151af --- /dev/null +++ b/.github/workflows/b-tests.yml @@ -0,0 +1,43 @@ +name: b.el Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + emacs_version: + - 24.4 + - 29.0 + - snapshot + fail-fast: false + steps: + - uses: actions/checkout@v3 + - name: Set up Emacs + uses: purcell/setup-emacs@v4.0 + with: + version: ${{ matrix.emacs_version }} + + - name: Test + run: | + bin/setup.sh + bin/tests.sh + + # docs: + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v3 + # - uses: purcell/setup-emacs@v4.0 + # with: + # version: 28.1 + # - name: Generate documentation + # run: | + # bin/setup.sh + # echo " Test Doc generation..." + # bin/docs.sh + # echo "════════════════════════════════════════════════════════════════════════════════" diff --git a/.gitignore b/.gitignore index 206569d..3044ef8 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ # Undo-tree save-files *.~undo-tree + +# macOS +.DS_Store diff --git a/b.el b/b.el index b76025f..2386db8 100644 --- a/b.el +++ b/b.el @@ -31,6 +31,8 @@ ;;; Code: +;; Dependencies + (require 'dash) ; Too damn convenient. ;; Dec <-> Hex diff --git a/bin/docs.sh b/bin/docs.sh new file mode 100755 index 0000000..23ce397 --- /dev/null +++ b/bin/docs.sh @@ -0,0 +1,40 @@ +#!/bin/sh +etd="$(dirname "$(find ~/.emacs.d | grep "/etd.el$" | tail -1)")" +dash="$(dirname "$(find ~/.emacs.d | grep "/dash.el$" | tail -1)")" + +cat < "02" + (b-dec-to-hex 16) => "10" + (b-dec-to-hex 280) => "0118")) + +;; (etd-group "Bit manipulation" +;; ) + +;; (etd-group "Byte parsing" +;; ) + + +;;; b-examples.el ends here