From 4f2401832e0ccb28fa66c122523e8aaf892af384 Mon Sep 17 00:00:00 2001 From: Sveta Smirnova Date: Thu, 20 Jul 2023 16:20:25 +0300 Subject: [PATCH] PT-2156 - Fix tests for lib Evgeniy's review on July 20 --- bin/pt-ioprofile | 2 +- bin/pt-mext | 2 +- bin/pt-mysql-summary | 2 +- bin/pt-pmp | 2 +- bin/pt-sift | 2 +- bin/pt-stalk | 2 +- bin/pt-summary | 2 +- lib/bash/parse_options.sh | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/pt-ioprofile b/bin/pt-ioprofile index 7a741a4af..d9ffa5c2b 100755 --- a/bin/pt-ioprofile +++ b/bin/pt-ioprofile @@ -411,7 +411,7 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - if [ 1 -eq $GLOBAL_CONFIG ]; then + if [ $GLOBAL_CONFIG -eq 1 ]; then continue else option_error "Unknown option: $real_opt" diff --git a/bin/pt-mext b/bin/pt-mext index 370ceed77..d975a7d7a 100755 --- a/bin/pt-mext +++ b/bin/pt-mext @@ -452,7 +452,7 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - if [ 1 -eq $GLOBAL_CONFIG ]; then + if [ $GLOBAL_CONFIG -eq 1 ]; then continue else option_error "Unknown option: $real_opt" diff --git a/bin/pt-mysql-summary b/bin/pt-mysql-summary index 50820dbb0..d459456cd 100755 --- a/bin/pt-mysql-summary +++ b/bin/pt-mysql-summary @@ -413,7 +413,7 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - if [ 1 -eq $GLOBAL_CONFIG ]; then + if [ $GLOBAL_CONFIG -eq 1 ]; then continue else option_error "Unknown option: $real_opt" diff --git a/bin/pt-pmp b/bin/pt-pmp index 397b1e500..b9f7d3a6d 100755 --- a/bin/pt-pmp +++ b/bin/pt-pmp @@ -454,7 +454,7 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - if [ 1 -eq $GLOBAL_CONFIG ]; then + if [ $GLOBAL_CONFIG -eq 1 ]; then continue else option_error "Unknown option: $real_opt" diff --git a/bin/pt-sift b/bin/pt-sift index d5fddaa5b..0416a16ce 100755 --- a/bin/pt-sift +++ b/bin/pt-sift @@ -452,7 +452,7 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - if [ 1 -eq $GLOBAL_CONFIG ]; then + if [ $GLOBAL_CONFIG -eq 1 ]; then continue else option_error "Unknown option: $real_opt" diff --git a/bin/pt-stalk b/bin/pt-stalk index e9097871f..e8e5d9a50 100755 --- a/bin/pt-stalk +++ b/bin/pt-stalk @@ -465,7 +465,7 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - if [ 1 -eq $GLOBAL_CONFIG ]; then + if [ $GLOBAL_CONFIG -eq 1 ]; then continue else option_error "Unknown option: $real_opt" diff --git a/bin/pt-summary b/bin/pt-summary index ce3c3f694..f2d94223c 100755 --- a/bin/pt-summary +++ b/bin/pt-summary @@ -420,7 +420,7 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - if [ 1 -eq $GLOBAL_CONFIG ]; then + if [ $GLOBAL_CONFIG -eq 1 ]; then continue else option_error "Unknown option: $real_opt" diff --git a/lib/bash/parse_options.sh b/lib/bash/parse_options.sh index 8988ed79a..a667cea36 100644 --- a/lib/bash/parse_options.sh +++ b/lib/bash/parse_options.sh @@ -476,7 +476,7 @@ _parse_command_line() { else spec=$(grep "^short form:-$opt\$" "$PT_TMPDIR"/po/* | cut -d ':' -f 1) if [ -z "$spec" ]; then - if [ 1 -eq $GLOBAL_CONFIG ]; then + if [ $GLOBAL_CONFIG -eq 1 ]; then # Not all programs uses the same options and since these options can be stored # in a common config file, we need to skip general options not used by a particular # program