Skip to content

Conversation

@lectrode
Copy link

@lectrode lectrode commented Nov 1, 2017

Addresses the following:

Resolves #63

  • Instead of using Extended Regex (which interferes with some symbols), just use Basic Regex
  • Wildcards are supported as .* (example: apacman -S apacm.*)

Resolves #79

  • Add support for + and @ symbols in packages
  • No need to disable regex mode as it will only be enabled if there are unsupported symbols detected

Resolves #80

  • echo to /dev/tty to ensure it is visible

Resolves #86

  • Ensures width variables are defined before using them in math

Additionally, this fixes some of the tests in tests.bats (including a proot crash workaround) and skips testing non-existant "broken" package.

I also made sure to run the tests.bats file against my changes before submitting the pull request:

$ bats tests.bats
 ✓ test command is found
 ✓ invoking without arguments prints usage
 ✓ invoke with nonexistent parameter returns 1
 ✓ invoking with '--help' parameter prints usage
 ✓ invoke with '--version' parameter prints ascii art
 ✓ invoke with '--verbose' parameter without package argument
 ✓ test internet connectivity
 ✓ interactive search install package
 ✓ interactive search install nonexistant package
 ✓ invoke with '-S' parameter installs package from AUR
 - invoke with '-S' parameter fails to build broken package from AUR (skipped)
 ✓ invoke with '-S' parameter installs cached AUR package
 ✓ invoke with '-S' parameter installs non-AUR package
 ✓ invoke with '-S' parameter fails to install nonexistant package
 ✓ prepare proot environment
 ✓ invoke with '-G' parameter download AUR package source
 ✓ invoke with '-G' parameter download old AUR package source
 1) 0.7-2 with '-G' parameter choose download old AUR package source                                     18/22
2) 0.7-1

 ✓ invoke with '-G' parameter choose download old AUR package source
 - invoke with '-S' parameter install package group (skipped)
 1) noto-fonts '-S' parameter install virtual package                                                    20/22
2) noto-fonts-extra
3) ttf-bitstream-vera
4) ttf-croscore
5) ttf-dejavu
6) ttf-freefont
7) ttf-linux-libertine
8) ttf-droid
9) ttf-liberation
10) ttf-ubuntu-font-family

 ✓ invoke with '-S' parameter install virtual package
 ✓ clean proot environment
 ✓ invoke with '-L' parameter lists installed packages by size

22 tests, 0 failures, 2 skipped

Let me know if there's anything you want to discuss

* crash when `width` variable is not defined (resolves #2)
* add support for + and @ symbols (resolves #3)

FEATURE CHANGE:
* extended regex incompatible with symbol support; basic used instead

CODE NOTES:
* new global variables for valid character sets for `tr -dc` instances

Signed-off-by: Lectrode <electrodexsnet@gmail.com>
BUG FIXES:
 * echo to /dev/tty to ensure functions properly display text
 * main error messages output to STDERR

Resolves #4

Signed-off-by: Lectrode <electrodexsnet@gmail.com>
BUG FIXES:
 * Typo in apacman line 1769
 * proot crash workaround (set PROOT_NO_SECCOMP=1)
 * Skip test for broken package ("broken" package no longer exists)
 * Fix proot -b parameter in multiple tests
 * Fix number of packages to test for in ttf-font

Resolves #6

Signed-off-by: Lectrode <electrodexsnet@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

script crashes when "width" variable is not defined Failure to echo package matches give option to disable regex mode support wildcards

1 participant