From 153bdc331f76781e5b723c6b8f123c5d9f7eb322 Mon Sep 17 00:00:00 2001 From: sekiguchi-nagisa Date: Wed, 15 May 2024 22:54:10 +0800 Subject: [PATCH] fix test and update github actions --- .github/workflows/ccpp.yml | 5 +++-- .github/workflows/release.yml | 2 +- .github/workflows/shared.yml | 5 +++-- test/exec/cases/base/builtin_complete5.ds | 10 +++++----- test/exec/cases/base/glob.ds | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index dea9ea162..54db8c966 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -177,13 +177,14 @@ jobs: strategy: matrix: cc: [ g++-14, clang++-18 ] - option: [ on, off ] + # option: [ on, off ] + option: [ off ] steps: - uses: actions/checkout@v4 - name: prepare run: | sudo apt update - sudo apt install language-pack-ja ninja-build lld lld-18 + sudo apt install language-pack-ja ninja-build lld lld-18 llvm-18 llvm-18-dev - name: configure run: | mkdir build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 99ff1e36b..dc3176757 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ on: jobs: build: name: Upload Release Asset - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Checkout code uses: actions/checkout@v4 diff --git a/.github/workflows/shared.yml b/.github/workflows/shared.yml index 6604c6375..dcb771f93 100644 --- a/.github/workflows/shared.yml +++ b/.github/workflows/shared.yml @@ -13,13 +13,14 @@ jobs: strategy: matrix: cc: [ g++-14, clang++-18 ] - option: [ on, off ] + # option: [ on, off ] + option: [ off ] steps: - uses: actions/checkout@v4 - name: prepare run: | sudo apt update - sudo apt install language-pack-ja ninja-build + sudo apt install language-pack-ja ninja-build lld lld-18 llvm-18 llvm-18-dev - name: configure run: | mkdir build diff --git a/test/exec/cases/base/builtin_complete5.ds b/test/exec/cases/base/builtin_complete5.ds index bfb843cca..0ca1d2de5 100644 --- a/test/exec/cases/base/builtin_complete5.ds +++ b/test/exec/cases/base/builtin_complete5.ds @@ -133,8 +133,8 @@ assert diff <(cd $SCRIPT_DIR/../ && complete -m ${$/\d+/.replace($mod as String, ## options assert "$({ complete -q ';'; assert $COMPREPLY.size() != 0; })".empty(); -assert complete -s 'var'; -assert $COMPREPLY.size() == 1 && $COMPREPLY[0] == 'var' +assert complete -s 'exportenv'; +assert $COMPREPLY.size() == 1; assert $COMPREPLY[0] == 'exportenv' ## space insertion (-s option) ### variable @@ -161,9 +161,9 @@ assert { complete -q 'whil'; $COMPREPLY.hasSpace(0); } # insert space after keyw assert diff <(complete -s 'for aaa i') <(echo 'in ') assert { complete -q 'for aaa i'; $COMPREPLY.hasSpace(0); } ### file name -assert diff <(complete -s '/bi') <(echo 'bin/') -assert { complete -q '/bi'; !$COMPREPLY.hasSpace(0); } # not insert space after dir -assert diff <(complete -s 'echo /bi') <(echo 'bin/') +assert diff <(complete -s '/us') <(echo 'usr/') +assert { complete -q '/us'; !$COMPREPLY.hasSpace(0); } # not insert space after dir +assert diff <(complete -s 'echo /us') <(echo 'usr/') assert { complete -q 'echo /bi'; !$COMPREPLY.hasSpace(0); } # not insert space after dir even if command argument if $OSTYPE !~ $/cygwin/i && $OSTYPE !~ $/msys/ { assert diff <(complete -s '~roo') <(echo '~root/') diff --git a/test/exec/cases/base/glob.ds b/test/exec/cases/base/glob.ds index 7581dff6e..f6b48a17f 100644 --- a/test/exec/cases/base/glob.ds +++ b/test/exec/cases/base/glob.ds @@ -93,7 +93,7 @@ assert "$(echo [ ])" == '[ ]' assert "$(echo [${""}""$34)" == '[' assert $(echo /[a-zA-Z]*).sort().join(" ") == $(sh -c 'echo /[a-zA-Z]*').sort().join(" ") assert $(echo /[!@]*).sort().join(" ") == $(sh -c 'echo /[!@]*').sort().join(" ") -assert $(echo /[^@]*).sort().join(" ") == $(sh -c 'echo /[^@]*').sort().join(" ") +assert $(echo /[^@]*).sort().join(" ") == $(echo /[!@]*).sort().join(" ") assert $(echo /[[:alnum:]]*).sort().join(" ") == $(sh -c 'echo /[[:alnum:]]*').sort().join(" ") assert $(echo ~/[a-z]*).sort().join(" ") == $(sh -c 'echo ~/[a-z]*').sort().join(" ")