From b1c604e8a62c576e60760feb56b06b6979bd756f Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Sun, 18 Dec 2022 10:04:22 -0600 Subject: [PATCH 01/27] implement improved camel case --- modules/speller/default/speller_impl.cpp | 120 ++++++++--------------- modules/speller/default/speller_impl.hpp | 2 + 2 files changed, 44 insertions(+), 78 deletions(-) diff --git a/modules/speller/default/speller_impl.cpp b/modules/speller/default/speller_impl.cpp index 12e226a3..02810bb7 100644 --- a/modules/speller/default/speller_impl.cpp +++ b/modules/speller/default/speller_impl.cpp @@ -214,6 +214,32 @@ namespace aspeller { return NULL; } + + /** + Returns false if camel case checking is not enabled. + Otherwise returns true when the provided string is acceptable camel case and false when not. + */ + bool SpellerImpl::check_camel(const char * str, size_t len) { + if(!camel_case_) { + return false; + } + + CompoundWord cw = lang_->split_word(str, len, true); + WordEntry we; + do { + size_t sz = cw.word_len(); + char word[sz+1]; + memcpy(word, cw.word, sz); + word[sz] = '\0'; + if (!check_simple(word, we)) { + return false; + } + cw = lang_->split_word(cw.rest, cw.rest_len(), true); + } while (!cw.empty()); + return true; + } + + PosibErr SpellerImpl::check(char * word, char * word_end, /* it WILL modify word */ bool try_uppercase, @@ -221,88 +247,26 @@ namespace aspeller { CheckInfo * ci, CheckInfo * ci_end, GuessInfo * gi, CompoundInfo * cpi) { + if (check_single(word, try_uppercase, *ci, gi)) { + return true; + } + if (check_camel(word, word_end - word)) { + return true; + } + clear_check_info(*ci); bool res = check_runtogether(word, word_end, try_uppercase, run_together_limit, ci, ci_end, gi); if (res) return true; - - CompoundWord cw = lang_->split_word(word, word_end - word, camel_case_); - if (cw.single()) return false; - bool ok = true; - CheckInfo * ci_prev = NULL; - do { - unsigned len = cw.word_len(); - - char save = word[len]; - word[len] = '\0'; - CheckInfo * ci_last = check_runtogether(word, word + len, try_uppercase, run_together_limit, ci, ci_end, gi); - bool found = ci_last; - word[len] = save; - - if (!found) { - if (cpi) { - ci_last = ci; - ok = false; - ci->word.str = word; - ci->word.len = len; - ci->incorrect = true; - cpi->incorrect_count++; - if (!cpi->first_incorrect) - cpi->first_incorrect = ci; - } else { - return false; - } - } - - if (cpi) - cpi->count++; - - if (ci_prev) { - ci_prev->compound = true; - ci_prev->next = ci; - } - ci_prev = ci_last; - ci = ci_last + 1; - if (ci >= ci_end) { - if (cpi) cpi->count = 0; - return false; - } - - word = word + cw.rest_offset(); - cw = lang_->split_word(cw.rest, cw.rest_len(), camel_case_); - - } while (!cw.empty()); - - return ok; - - // for (;;) { - // cw = lang_->split_word(cw.rest, cw.rest_len(), camel_case_); - // if (cw.empty()) break; - // if (ci + 1 >= ci_end) { - // if (cpi) cpi->count = 0; - // return false; - // } - // if (cpi) cpi->count++; - // len = cw.word_len(); - // save = word[len]; - // word[len] = '\0'; - // ci_last = check_runtogether(word, word + len, try_uppercase, run_together_limit, ci + 1, ci_end, gi); - // word[len] = save; - // ci->compound = true; - // ci->next = ci + 1; - // if (ci_last) { - // ci = ci_last; - // } else if (cpi) { - // ok = false; - // ci->word.str = word; - // ci->word.len = len; - // ci->incorrect = true; - // cpi->incorrect_count++; - // } else { - // return false; - // } - // word = word + cw.rest_offset(); - // } + if (cpi) { + ci->word.str = word; + ci->word.len = word_end - word; + ci->incorrect = true; + cpi->incorrect_count++; + if (!cpi->first_incorrect) + cpi->first_incorrect = ci; + } + return false; } ////////////////////////////////////////////////////////////////////// diff --git a/modules/speller/default/speller_impl.hpp b/modules/speller/default/speller_impl.hpp index 17a60d13..a72a81cf 100644 --- a/modules/speller/default/speller_impl.hpp +++ b/modules/speller/default/speller_impl.hpp @@ -125,6 +125,8 @@ namespace aspeller { return check(MutableString(&w.front(), sz)); } + bool check_camel(const char * str, size_t len); + CheckInfo * check_runtogether(char * word, char * word_end, /* it WILL modify word */ bool try_uppercase, unsigned run_together_limit, From 91fc096cc5d906db095c51fc3684e29fd7ce5467 Mon Sep 17 00:00:00 2001 From: "U-WHQ_NT_DOMAIN\\FE2417" Date: Sun, 18 Dec 2022 19:00:52 -0600 Subject: [PATCH 02/27] correct build failure --- modules/speller/default/speller_impl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/speller/default/speller_impl.cpp b/modules/speller/default/speller_impl.cpp index 02810bb7..7aadb750 100644 --- a/modules/speller/default/speller_impl.cpp +++ b/modules/speller/default/speller_impl.cpp @@ -247,9 +247,11 @@ namespace aspeller { CheckInfo * ci, CheckInfo * ci_end, GuessInfo * gi, CompoundInfo * cpi) { + clear_check_info(*ci); if (check_single(word, try_uppercase, *ci, gi)) { return true; } + clear_check_info(*ci); if (check_camel(word, word_end - word)) { return true; } From ccb33dbcd2b421b0c7ef8bb13e9008de560d340d Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Sat, 24 Dec 2022 10:28:27 -0600 Subject: [PATCH 03/27] set CheckInfo in check_camel --- modules/speller/default/speller_impl.cpp | 6 ++++-- modules/speller/default/speller_impl.hpp | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/speller/default/speller_impl.cpp b/modules/speller/default/speller_impl.cpp index 7aadb750..714f281a 100644 --- a/modules/speller/default/speller_impl.cpp +++ b/modules/speller/default/speller_impl.cpp @@ -219,7 +219,7 @@ namespace aspeller { Returns false if camel case checking is not enabled. Otherwise returns true when the provided string is acceptable camel case and false when not. */ - bool SpellerImpl::check_camel(const char * str, size_t len) { + bool SpellerImpl::check_camel(const char * str, size_t len, CheckInfo & ci) { if(!camel_case_) { return false; } @@ -236,6 +236,8 @@ namespace aspeller { } cw = lang_->split_word(cw.rest, cw.rest_len(), true); } while (!cw.empty()); + ci.word = str; + ci.compound = true; return true; } @@ -252,7 +254,7 @@ namespace aspeller { return true; } clear_check_info(*ci); - if (check_camel(word, word_end - word)) { + if (check_camel(word, word_end - word, *ci)) { return true; } diff --git a/modules/speller/default/speller_impl.hpp b/modules/speller/default/speller_impl.hpp index a72a81cf..2cc9f5d8 100644 --- a/modules/speller/default/speller_impl.hpp +++ b/modules/speller/default/speller_impl.hpp @@ -125,7 +125,7 @@ namespace aspeller { return check(MutableString(&w.front(), sz)); } - bool check_camel(const char * str, size_t len); + bool check_camel(const char * str, size_t len, CheckInfo & ci); CheckInfo * check_runtogether(char * word, char * word_end, /* it WILL modify word */ bool try_uppercase, From 18c2459c125413a285db1168feeadb6f4acc4e21 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Sat, 24 Dec 2022 14:45:57 -0600 Subject: [PATCH 04/27] attempt to fix build_jessie failure --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index f8b2c7df..1f00e61f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,6 +19,7 @@ jobs: - checkout # - run: sudo sed -i 's;http://archive.debian.org/debian/;http://deb.debian.org/debian/;' /etc/apt/sources.list + - run: sudo apt-key -y update - run: sudo apt-get -y update - run: sudo apt-get -y install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib - run: sudo apt-get -y purge aspell From f2692a6aea27aa215b35d4d55659ab1fc0082eca Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Sat, 24 Dec 2022 14:50:55 -0600 Subject: [PATCH 05/27] try two --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1f00e61f..0ae7caec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ jobs: - checkout # - run: sudo sed -i 's;http://archive.debian.org/debian/;http://deb.debian.org/debian/;' /etc/apt/sources.list - - run: sudo apt-key -y update + - run: sudo apt-key update - run: sudo apt-get -y update - run: sudo apt-get -y install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib - run: sudo apt-get -y purge aspell From 04fa8f80f9186c140182f8ec45b2b57d7df6f166 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Sun, 25 Dec 2022 04:09:22 -0600 Subject: [PATCH 06/27] undo last experimental change --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0ae7caec..f8b2c7df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,6 @@ jobs: - checkout # - run: sudo sed -i 's;http://archive.debian.org/debian/;http://deb.debian.org/debian/;' /etc/apt/sources.list - - run: sudo apt-key update - run: sudo apt-get -y update - run: sudo apt-get -y install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib - run: sudo apt-get -y purge aspell From 35837d528fd51596fa73bbdf5c5abc5291f27292 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Mon, 26 Dec 2022 22:26:01 -0600 Subject: [PATCH 07/27] let check_runtogether handle single words --- modules/speller/default/speller_impl.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/modules/speller/default/speller_impl.cpp b/modules/speller/default/speller_impl.cpp index 714f281a..0b1db1a7 100644 --- a/modules/speller/default/speller_impl.cpp +++ b/modules/speller/default/speller_impl.cpp @@ -226,6 +226,7 @@ namespace aspeller { CompoundWord cw = lang_->split_word(str, len, true); WordEntry we; + bool notSingle = false; do { size_t sz = cw.word_len(); char word[sz+1]; @@ -235,10 +236,16 @@ namespace aspeller { return false; } cw = lang_->split_word(cw.rest, cw.rest_len(), true); + if (cw.word_len()) { + notSingle = true; + } } while (!cw.empty()); - ci.word = str; - ci.compound = true; - return true; + if (notSingle) { + ci.word = str; + ci.compound = true; + return true; + } + return false; } @@ -249,10 +256,6 @@ namespace aspeller { CheckInfo * ci, CheckInfo * ci_end, GuessInfo * gi, CompoundInfo * cpi) { - clear_check_info(*ci); - if (check_single(word, try_uppercase, *ci, gi)) { - return true; - } clear_check_info(*ci); if (check_camel(word, word_end - word, *ci)) { return true; From a7e017e54b53cfa0a267c280abe7ad676a62a498 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Tue, 27 Dec 2022 13:26:27 -0600 Subject: [PATCH 08/27] revert to original check_runtoether logic if check_camel does not return true --- modules/speller/default/speller_impl.cpp | 58 ++++++++++++++++++++---- 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/modules/speller/default/speller_impl.cpp b/modules/speller/default/speller_impl.cpp index 0b1db1a7..e67fce09 100644 --- a/modules/speller/default/speller_impl.cpp +++ b/modules/speller/default/speller_impl.cpp @@ -265,15 +265,55 @@ namespace aspeller { bool res = check_runtogether(word, word_end, try_uppercase, run_together_limit, ci, ci_end, gi); if (res) return true; - if (cpi) { - ci->word.str = word; - ci->word.len = word_end - word; - ci->incorrect = true; - cpi->incorrect_count++; - if (!cpi->first_incorrect) - cpi->first_incorrect = ci; - } - return false; + CompoundWord cw = lang_->split_word(word, word_end - word, camel_case_); + if (cw.single()) return false; + bool ok = true; + CheckInfo * ci_prev = NULL; + do { + unsigned len = cw.word_len(); + + char save = word[len]; + word[len] = '\0'; + CheckInfo * ci_last = check_runtogether(word, word + len, try_uppercase, run_together_limit, ci, ci_end, gi); + bool found = ci_last; + word[len] = save; + + if (!found) { + if (cpi) { + ci_last = ci; + ok = false; + ci->word.str = word; + ci->word.len = len; + ci->incorrect = true; + cpi->incorrect_count++; + if (!cpi->first_incorrect) + cpi->first_incorrect = ci; + } else { + return false; + } + } + + if (cpi) + cpi->count++; + + if (ci_prev) { + ci_prev->compound = true; + ci_prev->next = ci; + } + + ci_prev = ci_last; + ci = ci_last + 1; + if (ci >= ci_end) { + if (cpi) cpi->count = 0; + return false; + } + + word = word + cw.rest_offset(); + cw = lang_->split_word(cw.rest, cw.rest_len(), camel_case_); + + } while (!cw.empty()); + + return ok; } ////////////////////////////////////////////////////////////////////// From 359833d8ebaea4c4392c8999cfaf12810bfa781e Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Wed, 28 Dec 2022 21:21:26 -0600 Subject: [PATCH 09/27] add unit test for improved camel case --- test/sanity | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/sanity b/test/sanity index 9d9684be..8cafb3ca 100755 --- a/test/sanity +++ b/test/sanity @@ -32,3 +32,20 @@ else exit 1 fi +echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | aspell --camel-case -d en_US -a > tmp/res +if cat tmp/res | fgrep '-'; then + echo "pass" +else + echo "fail:" + cat tmp/res + exit 1 +fi + +echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | aspell --camel-case -d en_US -a > tmp/res +if cat tmp/res | fgrep '-'; then + echo "pass" +else + echo "fail:" + cat tmp/res + exit 1 +fi From 98ca011770c2adc79c8668ddf06f7d9b18374be8 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 16:43:07 -0600 Subject: [PATCH 10/27] address review comment --- test/Makefile | 10 +++++++--- test/camel-case | 21 +++++++++++++++++++++ test/sanity | 18 ------------------ 3 files changed, 28 insertions(+), 21 deletions(-) create mode 100644 test/camel-case diff --git a/test/Makefile b/test/Makefile index 9f709ddb..43b9927c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -8,8 +8,8 @@ ifdef SLOPPY EXTRA_CONFIG_FLAGS += --enable-sloppy-null-term-strings endif -.PHONY: all prep sanity filter-test suggest wide cxx_warnings -all: prep sanity filter-test suggest wide cxx_warnings +.PHONY: all prep sanity camel-case filter-test suggest wide cxx_warnings +all: prep sanity camel-case filter-test suggest wide cxx_warnings cat test-res # warning-settings.mk defines EXTRA_CXXFLAGS @@ -28,12 +28,16 @@ sanity: prep ./sanity echo "all ok (sanity)" >> test-res +camel-case: prep + ./camel-case + echo "all ok (camel-case)" >> test-res + filter-test: prep ./filter-test "${ASPELL_WRAP} ${ASPELL}" < markdown.dat echo "all ok (markdown filter-test)" >> test-res inst/bin/aspell: build/Makefile phony - $(MAKE) -C build aspell && ( cmp -s build/aspell inst/bin/aspell || $(MAKE) -s -C build install ) + $(MAKE) -C build aspell${EXEEXT} && ( cmp -s build/aspell inst/bin/aspell || $(MAKE) -s -C build install ) inst/lib/aspell-0.60/en.multi: inst/bin/aspell aspell6-en-2018.04.16-0.tar.bz2 tar xf aspell6-en-2018.04.16-0.tar.bz2 diff --git a/test/camel-case b/test/camel-case new file mode 100644 index 00000000..55031161 --- /dev/null +++ b/test/camel-case @@ -0,0 +1,21 @@ +#!/bin/sh + +export PATH="`pwd`"/inst/bin:$PATH + +echo 'isIsOKForACamelCaseWordToContainNumerousCOMPONENTS-' | aspell --camel-case -d en_US -a > tmp/res +if cat tmp/res | fgrep -x '-'; then + echo "pass" +else + echo "fail:" + cat tmp/res + exit 1 +fi + +echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | aspell --camel-case -d en_US -a > tmp/res +if cat tmp/res | fgrep -x '-'; then + echo "pass" +else + echo "fail:" + cat tmp/res + exit 1 +fi diff --git a/test/sanity b/test/sanity index 8cafb3ca..f5c0231f 100755 --- a/test/sanity +++ b/test/sanity @@ -31,21 +31,3 @@ else cat tmp/incorrect exit 1 fi - -echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | aspell --camel-case -d en_US -a > tmp/res -if cat tmp/res | fgrep '-'; then - echo "pass" -else - echo "fail:" - cat tmp/res - exit 1 -fi - -echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | aspell --camel-case -d en_US -a > tmp/res -if cat tmp/res | fgrep '-'; then - echo "pass" -else - echo "fail:" - cat tmp/res - exit 1 -fi From c3e2c818411b100706311e7e4342da97690d63ea Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 17:02:24 -0600 Subject: [PATCH 11/27] address review comment --- test/Makefile | 2 +- test/sanity | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index 43b9927c..96c1c1d0 100644 --- a/test/Makefile +++ b/test/Makefile @@ -37,7 +37,7 @@ filter-test: prep echo "all ok (markdown filter-test)" >> test-res inst/bin/aspell: build/Makefile phony - $(MAKE) -C build aspell${EXEEXT} && ( cmp -s build/aspell inst/bin/aspell || $(MAKE) -s -C build install ) + $(MAKE) -C build aspell && ( cmp -s build/aspell inst/bin/aspell || $(MAKE) -s -C build install ) inst/lib/aspell-0.60/en.multi: inst/bin/aspell aspell6-en-2018.04.16-0.tar.bz2 tar xf aspell6-en-2018.04.16-0.tar.bz2 diff --git a/test/sanity b/test/sanity index f5c0231f..9d9684be 100755 --- a/test/sanity +++ b/test/sanity @@ -31,3 +31,4 @@ else cat tmp/incorrect exit 1 fi + From 6a22344aabe5ee20c941b05fcb9cbd881183c86d Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 17:18:05 -0600 Subject: [PATCH 12/27] address review comment --- test/camel-case | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/camel-case b/test/camel-case index 55031161..f75e2ebc 100644 --- a/test/camel-case +++ b/test/camel-case @@ -1,8 +1,11 @@ #!/bin/sh +set -e +set -x + export PATH="`pwd`"/inst/bin:$PATH -echo 'isIsOKForACamelCaseWordToContainNumerousCOMPONENTS-' | aspell --camel-case -d en_US -a > tmp/res +echo 'isIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | aspell --camel-case -d en_US -a > tmp/res if cat tmp/res | fgrep -x '-'; then echo "pass" else From 3aa7e4de56b18d9433ca6514d28b3003ecd2af6b Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 17:39:27 -0600 Subject: [PATCH 13/27] address review comment --- test/camel-case | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/camel-case b/test/camel-case index f75e2ebc..98450b31 100644 --- a/test/camel-case +++ b/test/camel-case @@ -3,9 +3,7 @@ set -e set -x -export PATH="`pwd`"/inst/bin:$PATH - -echo 'isIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | aspell --camel-case -d en_US -a > tmp/res +echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | ${ASPELL} --camel-case -d en_US -a > tmp/res if cat tmp/res | fgrep -x '-'; then echo "pass" else @@ -14,7 +12,7 @@ else exit 1 fi -echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | aspell --camel-case -d en_US -a > tmp/res +echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | ${ASPELL} --camel-case -d en_US -a > tmp/res if cat tmp/res | fgrep -x '-'; then echo "pass" else @@ -22,3 +20,4 @@ else cat tmp/res exit 1 fi + From 63a7cd976cac4724cdafb8cc6a54f1f10cdaced7 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 17:53:46 -0600 Subject: [PATCH 14/27] address review comment --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index 96c1c1d0..f821de90 100644 --- a/test/Makefile +++ b/test/Makefile @@ -29,7 +29,7 @@ sanity: prep echo "all ok (sanity)" >> test-res camel-case: prep - ./camel-case + sh ./camel-case echo "all ok (camel-case)" >> test-res filter-test: prep From 0c919d627f00f5d34fd6fdb68d9312806bbf87b6 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 18:22:32 -0600 Subject: [PATCH 15/27] address review comment --- test/Makefile | 2 +- test/camel-case | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/Makefile b/test/Makefile index f821de90..cbf6ce39 100644 --- a/test/Makefile +++ b/test/Makefile @@ -28,7 +28,7 @@ sanity: prep ./sanity echo "all ok (sanity)" >> test-res -camel-case: prep +camel-case: prep | sanity sh ./camel-case echo "all ok (camel-case)" >> test-res diff --git a/test/camel-case b/test/camel-case index 98450b31..9ee0ba07 100644 --- a/test/camel-case +++ b/test/camel-case @@ -3,7 +3,7 @@ set -e set -x -echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | ${ASPELL} --camel-case -d en_US -a > tmp/res +echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | aspell --camel-case -d en_US -a > tmp/res if cat tmp/res | fgrep -x '-'; then echo "pass" else @@ -12,7 +12,7 @@ else exit 1 fi -echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | ${ASPELL} --camel-case -d en_US -a > tmp/res +echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | aspell --camel-case -d en_US -a > tmp/res if cat tmp/res | fgrep -x '-'; then echo "pass" else From eaa1733bebf5b0e79f434375e06227afa0eac704 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 18:24:18 -0600 Subject: [PATCH 16/27] address review comment --- test/camel-case | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/camel-case b/test/camel-case index 9ee0ba07..98450b31 100644 --- a/test/camel-case +++ b/test/camel-case @@ -3,7 +3,7 @@ set -e set -x -echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | aspell --camel-case -d en_US -a > tmp/res +echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | ${ASPELL} --camel-case -d en_US -a > tmp/res if cat tmp/res | fgrep -x '-'; then echo "pass" else @@ -12,7 +12,7 @@ else exit 1 fi -echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | aspell --camel-case -d en_US -a > tmp/res +echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | ${ASPELL} --camel-case -d en_US -a > tmp/res if cat tmp/res | fgrep -x '-'; then echo "pass" else From aec924ac881c8ff576f0ddb5b2cb9feb2dc89d39 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 18:27:42 -0600 Subject: [PATCH 17/27] address review comment --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index cbf6ce39..d62e709f 100644 --- a/test/Makefile +++ b/test/Makefile @@ -29,7 +29,7 @@ sanity: prep echo "all ok (sanity)" >> test-res camel-case: prep | sanity - sh ./camel-case + ./camel-case echo "all ok (camel-case)" >> test-res filter-test: prep From a2fba2174cd5a6b2ee2801fb10db8a6e79a9ba55 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 18:29:30 -0600 Subject: [PATCH 18/27] address review comment --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index d62e709f..cbf6ce39 100644 --- a/test/Makefile +++ b/test/Makefile @@ -29,7 +29,7 @@ sanity: prep echo "all ok (sanity)" >> test-res camel-case: prep | sanity - ./camel-case + sh ./camel-case echo "all ok (camel-case)" >> test-res filter-test: prep From 1044d2fee8d0194d428e06dc2e3de0ae0e5af6c2 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 18:33:17 -0600 Subject: [PATCH 19/27] address review comment --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index cbf6ce39..f821de90 100644 --- a/test/Makefile +++ b/test/Makefile @@ -28,7 +28,7 @@ sanity: prep ./sanity echo "all ok (sanity)" >> test-res -camel-case: prep | sanity +camel-case: prep sh ./camel-case echo "all ok (camel-case)" >> test-res From 66f3e34b496b71ff8f6db55e1bb6c5380840084f Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 18:34:44 -0600 Subject: [PATCH 20/27] address review comment --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index f821de90..cbf6ce39 100644 --- a/test/Makefile +++ b/test/Makefile @@ -28,7 +28,7 @@ sanity: prep ./sanity echo "all ok (sanity)" >> test-res -camel-case: prep +camel-case: prep | sanity sh ./camel-case echo "all ok (camel-case)" >> test-res From 58051cdb43a5bfac82f7796f00a23a386fd699cc Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 19:12:35 -0600 Subject: [PATCH 21/27] address review comment --- test/Makefile | 4 ++-- test/camel-case | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/test/Makefile b/test/Makefile index cbf6ce39..96c1c1d0 100644 --- a/test/Makefile +++ b/test/Makefile @@ -28,8 +28,8 @@ sanity: prep ./sanity echo "all ok (sanity)" >> test-res -camel-case: prep | sanity - sh ./camel-case +camel-case: prep + ./camel-case echo "all ok (camel-case)" >> test-res filter-test: prep diff --git a/test/camel-case b/test/camel-case index 98450b31..b260aee8 100644 --- a/test/camel-case +++ b/test/camel-case @@ -3,21 +3,20 @@ set -e set -x -echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | ${ASPELL} --camel-case -d en_US -a > tmp/res -if cat tmp/res | fgrep -x '-'; then +echo 'itIsOKForACamelCaseWordToContainNumerousCOMPONENTS' | ${ASPELL} --camel-case -d en_US -a > tmp/camel-case-res +if cat tmp/camel-case-res | fgrep -x '-'; then echo "pass" else echo "fail:" - cat tmp/res + cat tmp/camel-case-res exit 1 fi -echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | ${ASPELL} --camel-case -d en_US -a > tmp/res -if cat tmp/res | fgrep -x '-'; then +echo 'EvenIfTheFirstCOMPONENTBeginsWithACapitalLetter' | ${ASPELL} --camel-case -d en_US -a > tmp/camel-case-res +if cat tmp/camel-case-res | fgrep -x '-'; then echo "pass" else echo "fail:" - cat tmp/res + cat tmp/camel-case-res exit 1 fi - From cae6a1f8296a2f96dfb05e80a966e381c792d224 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Fri, 30 Dec 2022 19:18:58 -0600 Subject: [PATCH 22/27] address review comment --- test/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile b/test/Makefile index 96c1c1d0..f821de90 100644 --- a/test/Makefile +++ b/test/Makefile @@ -29,7 +29,7 @@ sanity: prep echo "all ok (sanity)" >> test-res camel-case: prep - ./camel-case + sh ./camel-case echo "all ok (camel-case)" >> test-res filter-test: prep From 4f4d55f314002d6a4bcb4beeaec3b457972e3478 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Wed, 14 Jun 2023 13:34:38 -0500 Subject: [PATCH 23/27] attempt to get a successful build --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f8b2c7df..656dc82f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -20,7 +20,7 @@ jobs: # - run: sudo sed -i 's;http://archive.debian.org/debian/;http://deb.debian.org/debian/;' /etc/apt/sources.list - run: sudo apt-get -y update - - run: sudo apt-get -y install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib + - run: sudo apt-get -y --force-yes install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib - run: sudo apt-get -y purge aspell # - run: ./autogen From 7cbc00b6d68d8530c91b6b47f4b7c62be3822187 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Wed, 14 Jun 2023 13:57:03 -0500 Subject: [PATCH 24/27] that didn't work. trying something else --- .circleci/config.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 656dc82f..a71c5861 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,13 +14,13 @@ jobs: # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - - image: circleci/buildpack-deps:jessie + - image: cimg/base:jessie steps: - checkout # - run: sudo sed -i 's;http://archive.debian.org/debian/;http://deb.debian.org/debian/;' /etc/apt/sources.list - run: sudo apt-get -y update - - run: sudo apt-get -y --force-yes install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib + - run: sudo apt-get -y install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib - run: sudo apt-get -y purge aspell # - run: ./autogen @@ -37,7 +37,7 @@ jobs: # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - - image: circleci/buildpack-deps:16.04 + - image: cimg/base:16.04 steps: # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts @@ -78,7 +78,7 @@ jobs: # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - - image: circleci/buildpack-deps:18.04 + - image: cimg/base:18.04 steps: # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts @@ -133,7 +133,7 @@ jobs: # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - - image: circleci/buildpack-deps:20.04 + - image: cimg/base:20.04 steps: # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts @@ -193,7 +193,7 @@ jobs: working_directory: ~/GNUAspell/aspell parallelism: 1 docker: - - image: circleci/buildpack-deps:20.04 + - image: cimg/base:20.04 steps: # Machine Setup - checkout From 9f5121ef9fe748d067337888a37e40805bd7eb56 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Wed, 14 Jun 2023 13:59:19 -0500 Subject: [PATCH 25/27] try three --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a71c5861..48ef6f66 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,7 +37,7 @@ jobs: # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - - image: cimg/base:16.04 + - image: circleci/buildpack-deps:16.04 steps: # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts @@ -78,7 +78,7 @@ jobs: # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - - image: cimg/base:18.04 + - image: circleci/buildpack-deps:18.04 steps: # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts @@ -133,7 +133,7 @@ jobs: # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - - image: cimg/base:20.04 + - image: circleci/buildpack-deps:20.04 steps: # Machine Setup # If you break your build into multiple jobs with workflows, you will probably want to do the parts @@ -193,7 +193,7 @@ jobs: working_directory: ~/GNUAspell/aspell parallelism: 1 docker: - - image: cimg/base:20.04 + - image: circleci/buildpack-deps:20.04 steps: # Machine Setup - checkout From 6123afb14dc0b730be50f9856ba1cb54e4847c8c Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Wed, 14 Jun 2023 14:10:26 -0500 Subject: [PATCH 26/27] let's try something else --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 48ef6f66..d0ed7158 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,11 +14,13 @@ jobs: # To see the list of pre-built images that CircleCI provides for most common languages see # https://circleci.com/docs/2.0/circleci-images/ docker: - - image: cimg/base:jessie + - image: circleci/buildpack-deps:jessie steps: - checkout # - run: sudo sed -i 's;http://archive.debian.org/debian/;http://deb.debian.org/debian/;' /etc/apt/sources.list + - run: sudo sed -i '/jessie-backports/d' /etc/apt/sources.list + - run: sudo sed -i '/jessie-updates/d' /etc/apt/sources.list - run: sudo apt-get -y update - run: sudo apt-get -y install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib - run: sudo apt-get -y purge aspell From 0beda3cdb1a07050273e284534b28c7be42103f7 Mon Sep 17 00:00:00 2001 From: Fred Eckertson Date: Wed, 14 Jun 2023 14:27:05 -0500 Subject: [PATCH 27/27] back to the way it was --- .circleci/config.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d0ed7158..f8b2c7df 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,8 +19,6 @@ jobs: - checkout # - run: sudo sed -i 's;http://archive.debian.org/debian/;http://deb.debian.org/debian/;' /etc/apt/sources.list - - run: sudo sed -i '/jessie-backports/d' /etc/apt/sources.list - - run: sudo sed -i '/jessie-updates/d' /etc/apt/sources.list - run: sudo apt-get -y update - run: sudo apt-get -y install make autopoint texinfo libtool intltool bzip2 gettext clang-3.5 clang-4.0 g++-multilib - run: sudo apt-get -y purge aspell