From da713c2366636f46b719afddcf7e4af46da4c641 Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Sat, 3 Dec 2011 13:41:18 -0500 Subject: [PATCH] commit bash-20041216 snapshot --- CWRU/CWRU.chlog | 23 ++++++++++++++ CWRU/CWRU.chlog~ | 27 ++++++++++++++++ builtins/set.def | 2 +- builtins/set.def~ | 2 ++ subst.c | 48 +++++++++++++++++++---------- subst.c~ | 63 ++++++++++++++++++++++++++------------ tests/RUN-ONE-TEST | 2 +- tests/RUN-ONE-TEST.gprof | 9 ++++++ tests/RUN-ONE-TEST.gprof~ | 9 ++++++ tests/array.tests | 3 +- tests/array.tests~ | 7 +++-- tests/gmon.out | Bin 0 -> 924316 bytes tests/intl.tests | 2 +- tests/intl.tests~ | 4 +-- tests/shopt.right | 6 ++-- 15 files changed, 158 insertions(+), 49 deletions(-) create mode 100755 tests/RUN-ONE-TEST.gprof create mode 100755 tests/RUN-ONE-TEST.gprof~ create mode 100644 tests/gmon.out diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 19a093f7f..95620aa3c 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -10696,3 +10696,26 @@ builtins/set.def builtins/shopt.def - fix bug that caused `gnu_errfmt' to not be compiled in unless READLINE is defined + + 12/16 + ----- +subst.c + - fixed a typo in string_extract_verbatim in first call to MBLEN + (used `slen - 1' instead of `slen - i') + + 12/17 + ----- +subst.c + - avoid some calls to strlen if the value is only being used for + ADVANCE_CHAR and MB_CUR_MAX == 1 (since ADVANCE_CHAR doesn't need + it unless multibyte characters are possible) + - change string_extract_verbatim so it takes the length of the string + as a parameter, so we don't have to recompute the length of the same + string over and over again when doing word splitting (that kills if + it's a long string) + + 12/18 + ----- +subst.c + - in string_list_dollar_star, make sure to null-terminate the + separator if the character is longer than one byte diff --git a/CWRU/CWRU.chlog~ b/CWRU/CWRU.chlog~ index 94290735a..3d499d2ce 100644 --- a/CWRU/CWRU.chlog~ +++ b/CWRU/CWRU.chlog~ @@ -10687,3 +10687,30 @@ subst.c lib/readline/bind.c - make new-style "\M-x" keybindings obey `convert-meta' settings (bug reported by twaugh@redhat.com) + + 12/14 + ----- +builtins/set.def + - added description of `-' option to help text + +builtins/shopt.def + - fix bug that caused `gnu_errfmt' to not be compiled in unless + READLINE is defined + + 12/16 + ----- +subst.c + - fixed a typo in string_extract_verbatim in first call to MBLEN + (used `slen - 1' instead of `slen - i') + + 12/17 + ----- +subst.c + - avoid some calls to strlen if the value is only being used for + ADVANCE_CHAR and MB_CUR_MAX == 1 (since ADVANCE_CHAR doesn't need + it unless multibyte characters are possible) + - change string_extract_verbatim so it takes the length of the string + as a parameter, so we don't have to recompute the length of the same + string over and over again when doing word splitting (that kills if + it's a long string) + diff --git a/builtins/set.def b/builtins/set.def index 87a58d778..3bb327040 100644 --- a/builtins/set.def +++ b/builtins/set.def @@ -128,7 +128,7 @@ $SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option] [arg ...] -E If set, the ERR trap is inherited by shell functions. #if defined (BANG_HISTORY) -H Enable ! style history substitution. This flag is on - by default. + by default when the shell is interactive. #endif /* BANG_HISTORY */ -P If set, do not follow symbolic links when executing commands such as cd which change the current directory. diff --git a/builtins/set.def~ b/builtins/set.def~ index a6046d979..87a58d778 100644 --- a/builtins/set.def~ +++ b/builtins/set.def~ @@ -133,6 +133,8 @@ $SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option] [arg ...] -P If set, do not follow symbolic links when executing commands such as cd which change the current directory. -T If set, the DEBUG trap is inherited by shell functions. + - Assign any remaining arguments to the positional parameters. + The -x and -v options are turned off. Using + rather than - causes these flags to be turned off. The flags can also be used upon invocation of the shell. The current diff --git a/subst.c b/subst.c index 513939e13..73778459f 100644 --- a/subst.c +++ b/subst.c @@ -209,7 +209,7 @@ static SHELL_VAR *do_compound_assignment __P((char *, char *, int)); #endif static int do_assignment_internal __P((const WORD_DESC *, int)); -static char *string_extract_verbatim __P((char *, int *, char *)); +static char *string_extract_verbatim __P((char *, size_t, int *, char *)); static char *string_extract __P((char *, int *, char *, int)); static char *string_extract_double_quoted __P((char *, int *, int)); static inline char *string_extract_single_quoted __P((char *, int *)); @@ -555,7 +555,7 @@ string_extract (string, sindex, charlist, flags) char *temp; DECLARE_MBSTATE; - slen = strlen (string + *sindex) + *sindex; + slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0; i = *sindex; while (c = string[i]) { @@ -830,7 +830,8 @@ string_extract_single_quoted (string, sindex) char *t; DECLARE_MBSTATE; - slen = strlen (string + *sindex) + *sindex; + /* Don't need slen for ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0; i = *sindex; while (string[i] && string[i] != '\'') ADVANCE_CHAR (string, slen, i); @@ -865,13 +866,13 @@ skip_single_quoted (string, slen, sind) /* Just like string_extract, but doesn't hack backslashes or any of that other stuff. Obeys CTLESC quoting. Used to do splitting on $IFS. */ static char * -string_extract_verbatim (string, sindex, charlist) +string_extract_verbatim (string, slen, sindex, charlist) char *string; + size_t slen; int *sindex; char *charlist; { register int i = *sindex; - size_t slen; #if defined (HANDLE_MULTIBYTE) size_t clen; wchar_t *wcharlist; @@ -887,8 +888,12 @@ string_extract_verbatim (string, sindex, charlist) return temp; } - slen = strlen (string + *sindex) + *sindex; i = *sindex; +#if 0 + /* See how the MBLEN and ADVANCE_CHAR macros work to understand why we need + this only if MB_CUR_MAX > 1. */ + slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 1; +#endif #if defined (HANDLE_MULTIBYTE) clen = strlen (charlist); wcharlist = 0; @@ -905,7 +910,7 @@ string_extract_verbatim (string, sindex, charlist) } #if defined (HANDLE_MULTIBYTE) - mblength = MBLEN (string + i, slen - 1); + mblength = MBLEN (string + i, slen - i); if (mblength > 1) { wchar_t wc; @@ -1768,7 +1773,10 @@ string_list_dollar_star (list) sep[1] = '\0'; } else - memcpy (sep, ifs_firstc, ifs_firstc_len); + { + memcpy (sep, ifs_firstc, ifs_firstc_len); + sep[ifs_firstc_len] = '\0'; + } #else sep[0] = ifs_firstc; sep[1] = '\0'; @@ -1906,9 +1914,12 @@ list_string (string, separators, quoted) extract a word, stopping at a separator skip sequences of spc, tab, or nl as long as they are separators This obeys the field splitting rules in Posix.2. */ + slen = (MB_CUR_MAX > 1) ? strlen (string) : 1; for (result = (WORD_LIST *)NULL, sindex = 0; string[sindex]; ) { - current_word = string_extract_verbatim (string, &sindex, separators); + /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim + unless multibyte chars are possible. */ + current_word = string_extract_verbatim (string, slen, &sindex, separators); if (current_word == 0) break; @@ -1954,8 +1965,6 @@ list_string (string, separators, quoted) if (string[sindex]) { DECLARE_MBSTATE; - if (slen == 0) - slen = strlen (string); ADVANCE_CHAR (string, slen, sindex); } @@ -2025,7 +2034,10 @@ get_word_from_string (stringp, separators, endptr) This obeys the field splitting rules in Posix.2. */ sindex = 0; - current_word = string_extract_verbatim (s, &sindex, separators); + /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim + unless multibyte chars are possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (s) : 1; + current_word = string_extract_verbatim (s, slen, &sindex, separators); /* Set ENDPTR to the first character after the end of the word. */ if (endptr) @@ -2038,8 +2050,6 @@ get_word_from_string (stringp, separators, endptr) if (s[sindex]) { DECLARE_MBSTATE; - if (slen == 0) - slen = strlen (s); ADVANCE_CHAR (s, slen, sindex); } @@ -2464,7 +2474,8 @@ expand_string_if_necessary (string, quoted, func) char *ret; DECLARE_MBSTATE; - slen = strlen (string); + /* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (string) : 0; i = saw_quote = 0; while (string[i]) { @@ -5295,7 +5306,8 @@ mb_substring (string, s, e) DECLARE_MBSTATE; start = 0; - slen = STRLEN (string); + /* Don't need string length in ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? STRLEN (string) : 0; i = s; while (string[start] && i--) @@ -6435,7 +6447,9 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin string = word->word; if (string == 0) goto finished_with_string; - string_size = strlen (string); + /* Don't need the string length for the SADD... and COPY_ macros unless + multibyte characters are possible. */ + string_size = (MB_CUR_MAX > 1) ? strlen (string) : 1; if (contains_dollar_at) *contains_dollar_at = 0; diff --git a/subst.c~ b/subst.c~ index 879649c84..796049e0b 100644 --- a/subst.c~ +++ b/subst.c~ @@ -209,7 +209,7 @@ static SHELL_VAR *do_compound_assignment __P((char *, char *, int)); #endif static int do_assignment_internal __P((const WORD_DESC *, int)); -static char *string_extract_verbatim __P((char *, int *, char *)); +static char *string_extract_verbatim __P((char *, size_t, int *, char *)); static char *string_extract __P((char *, int *, char *, int)); static char *string_extract_double_quoted __P((char *, int *, int)); static inline char *string_extract_single_quoted __P((char *, int *)); @@ -555,7 +555,7 @@ string_extract (string, sindex, charlist, flags) char *temp; DECLARE_MBSTATE; - slen = strlen (string + *sindex) + *sindex; + slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0; i = *sindex; while (c = string[i]) { @@ -830,7 +830,8 @@ string_extract_single_quoted (string, sindex) char *t; DECLARE_MBSTATE; - slen = strlen (string + *sindex) + *sindex; + /* Don't need slen for ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0; i = *sindex; while (string[i] && string[i] != '\'') ADVANCE_CHAR (string, slen, i); @@ -865,13 +866,13 @@ skip_single_quoted (string, slen, sind) /* Just like string_extract, but doesn't hack backslashes or any of that other stuff. Obeys CTLESC quoting. Used to do splitting on $IFS. */ static char * -string_extract_verbatim (string, sindex, charlist) +string_extract_verbatim (string, slen, sindex, charlist) char *string; + size_t slen; int *sindex; char *charlist; { register int i = *sindex; - size_t slen; #if defined (HANDLE_MULTIBYTE) size_t clen; wchar_t *wcharlist; @@ -887,8 +888,12 @@ string_extract_verbatim (string, sindex, charlist) return temp; } - slen = strlen (string + *sindex) + *sindex; i = *sindex; +#if 0 + /* See how the MBLEN and ADVANCE_CHAR macros work to understand why we need + this only if MB_CUR_MAX > 1. */ + slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 1; +#endif #if defined (HANDLE_MULTIBYTE) clen = strlen (charlist); wcharlist = 0; @@ -905,7 +910,7 @@ string_extract_verbatim (string, sindex, charlist) } #if defined (HANDLE_MULTIBYTE) - mblength = MBLEN (string + i, slen - 1); + mblength = MBLEN (string + i, slen - i); if (mblength > 1) { wchar_t wc; @@ -1768,7 +1773,10 @@ string_list_dollar_star (list) sep[1] = '\0'; } else - memcpy (sep, ifs_firstc, ifs_firstc_len); + { + memcpy (sep, ifs_firstc, ifs_firstc_len); + sep[ifs_firstc_len] = '\0'; + } #else sep[0] = ifs_firstc; sep[1] = '\0'; @@ -1906,9 +1914,12 @@ list_string (string, separators, quoted) extract a word, stopping at a separator skip sequences of spc, tab, or nl as long as they are separators This obeys the field splitting rules in Posix.2. */ + slen = (MB_CUR_MAX > 1) ? strlen (string) : 1; for (result = (WORD_LIST *)NULL, sindex = 0; string[sindex]; ) { - current_word = string_extract_verbatim (string, &sindex, separators); + /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim + unless multibyte chars are possible. */ + current_word = string_extract_verbatim (string, slen, &sindex, separators); if (current_word == 0) break; @@ -1954,8 +1965,6 @@ list_string (string, separators, quoted) if (string[sindex]) { DECLARE_MBSTATE; - if (slen == 0) - slen = strlen (string); ADVANCE_CHAR (string, slen, sindex); } @@ -2025,7 +2034,10 @@ get_word_from_string (stringp, separators, endptr) This obeys the field splitting rules in Posix.2. */ sindex = 0; - current_word = string_extract_verbatim (s, &sindex, separators); + /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim + unless multibyte chars are possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (s) : 1; + current_word = string_extract_verbatim (s, slen, &sindex, separators); /* Set ENDPTR to the first character after the end of the word. */ if (endptr) @@ -2038,8 +2050,6 @@ get_word_from_string (stringp, separators, endptr) if (s[sindex]) { DECLARE_MBSTATE; - if (slen == 0) - slen = strlen (s); ADVANCE_CHAR (s, slen, sindex); } @@ -2201,7 +2211,7 @@ do_assignment_internal (word, expand) if (name[offset - 1] == '+') { appendop = 1; - name[offset - 1] = 0; + name[offset - 1] = '\0'; } name[offset] = 0; /* might need this set later */ @@ -2239,7 +2249,7 @@ do_assignment_internal (word, expand) name[offset - 1] = '+'; xtrace_print_assignment (name, value, assign_list, 1); if (appendop) - name[offset - 1] = '+'; + name[offset - 1] = '\0'; } #define ASSIGN_RETURN(r) do { FREE (value); free (name); return (r); } while (0) @@ -2464,7 +2474,8 @@ expand_string_if_necessary (string, quoted, func) char *ret; DECLARE_MBSTATE; - slen = strlen (string); + /* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? strlen (string) : 0; i = saw_quote = 0; while (string[i]) { @@ -5235,6 +5246,15 @@ get_var_and_type (varname, value, quoted, varp, valp) } *varp = v; } + else if (v && (ALL_ELEMENT_SUB (temp[0]) && temp[1] == ']')) + { + vtype = VT_VARIABLE; + *varp = v; + if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) + *valp = dequote_string (value); + else + *valp = dequote_escapes (value); + } else return -1; } @@ -5286,7 +5306,8 @@ mb_substring (string, s, e) DECLARE_MBSTATE; start = 0; - slen = STRLEN (string); + /* Don't need string length in ADVANCE_CHAR unless multibyte chars possible. */ + slen = (MB_CUR_MAX > 1) ? STRLEN (string) : 0; i = s; while (string[start] && i--) @@ -6426,7 +6447,9 @@ expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_somethin string = word->word; if (string == 0) goto finished_with_string; - string_size = strlen (string); + /* Don't need the string length for the SADD... and COPY_ macros unless + multibyte characters are possible. */ + string_size = (MB_CUR_MAX > 1) ? strlen (string) : 1; if (contains_dollar_at) *contains_dollar_at = 0; @@ -6574,7 +6597,7 @@ add_string: goto add_string; } else - { +b { FREE (temp); goto add_character; } diff --git a/tests/RUN-ONE-TEST b/tests/RUN-ONE-TEST index 3efcf32d6..72ec06a2c 100755 --- a/tests/RUN-ONE-TEST +++ b/tests/RUN-ONE-TEST @@ -1,4 +1,4 @@ -BUILD_DIR=/usr/local/build/chet/bash/bash-current +BUILD_DIR=/usr/local/build/bash/bash-current THIS_SH=$BUILD_DIR/bash PATH=$PATH:$BUILD_DIR diff --git a/tests/RUN-ONE-TEST.gprof b/tests/RUN-ONE-TEST.gprof new file mode 100755 index 000000000..b29a64fd4 --- /dev/null +++ b/tests/RUN-ONE-TEST.gprof @@ -0,0 +1,9 @@ +BUILD_DIR=/usr/local/build/bash/bash-20041216-gprof +THIS_SH=$BUILD_DIR/bash +PATH=$PATH:$BUILD_DIR + +export THIS_SH PATH + +rm -f /tmp/xx + +/bin/sh "$@" diff --git a/tests/RUN-ONE-TEST.gprof~ b/tests/RUN-ONE-TEST.gprof~ new file mode 100755 index 000000000..72ec06a2c --- /dev/null +++ b/tests/RUN-ONE-TEST.gprof~ @@ -0,0 +1,9 @@ +BUILD_DIR=/usr/local/build/bash/bash-current +THIS_SH=$BUILD_DIR/bash +PATH=$PATH:$BUILD_DIR + +export THIS_SH PATH + +rm -f /tmp/xx + +/bin/sh "$@" diff --git a/tests/array.tests b/tests/array.tests index 5aca26510..4a735d8cd 100644 --- a/tests/array.tests +++ b/tests/array.tests @@ -374,7 +374,7 @@ echo "${x[@]}" mkdir $TMPDIR/bash-test-$$ cd $TMPDIR/bash-test-$$ -trap "cd / ; rm -rf $TMPDIR/bash-test/$$" 0 1 2 3 6 15 +trap "cd / ; rm -rf $TMPDIR/bash-test-$$" 0 1 2 3 6 15 touch '[3]=abcde' @@ -396,4 +396,3 @@ unset x[2] x[9]='9' echo ${x[*]: -1} - diff --git a/tests/array.tests~ b/tests/array.tests~ index 0d638784e..5aca26510 100644 --- a/tests/array.tests~ +++ b/tests/array.tests~ @@ -236,7 +236,12 @@ echo "value = ${barray[*]}" set -u ( echo ${#narray[4]} ) +${THIS_SH} ./array1.sub +${THIS_SH} ./array2.sub + # some old bugs and ksh93 compatibility tests +${THIS_SH} ./array3.sub + set +u cd /tmp @@ -392,5 +397,3 @@ x[9]='9' echo ${x[*]: -1} -${THIS_SH} ./array1.sub -${THIS_SH} ./array2.sub diff --git a/tests/gmon.out b/tests/gmon.out new file mode 100644 index 0000000000000000000000000000000000000000..c50ffc5a1b095df705f7d1aec286717921119ecb GIT binary patch literal 924316 zc-rmVf0S2M{qOO8ehgBgVq%Skf(n9$iaHu4Au1Xr8s$_}n4^w~I>IQZpretYlA;bu ziG+oUh=NHn873+wD(RGnXo!fY7y}U@QejbkU;FI$`F!@e>-*2W>)yN8z3cf{>$Cj4 zIOlVI?6c3_`}~-C@~^*n(m9vw)22_2KJJLi#$I|v(*@`F&**b6yL9Y%V-G*(@Wu&> z&h6jTrjI%I?51+A3r3G?I{c_|mi|lryIIa1Gy3xCJpaRL&X_QE+<6xte&T;Od2BJw zf4%tZaidNebMeJvMjw7cb+cerHH z2+RKp`Oyx`|8(x)JevORkSo)*tq0dRchoe?|52Xo+~Jm!G~^@tTGoI1bX9qkS>@M9 zW%>C!%PPOVy_{?4Z~34iXXCe9?jELpVYcOcl?OOCV5sHZ%1fR5(oD+-E2}IITOM-$ zM}1%AvWt3IUZuRdSE>qUl{iu1w!mc~Ufe zkB}?VRbP&4bJ^3QEUWB~TcTpI%TAD39J zRo3x)ZL#HjbZpw4TWRM{@@dueE>Zb>Ty@h`_upyz2d{V8-^=q&>p!u>)%<0OWv&0j ztx?wcPu$`1mF4-U^`E4(@Qhl^hbwn>>4iHi4=8eWQ&~TcQ63tt|8vSZwrk7feO`I7 zOYSb0x5je$`=>*`*6NdA`AJJ%`n^?_*D32(_3;V)Qy;ZS+K1DJTGn}U>U#aNKi)bfiMIVzov-_^vV50wr%iU*H`dtv zpHbGbzS3&BpO&S4|K&)_YIsi9wwyNJ@}bTR*S23iPEDOZeup_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}$@3HK_jkCOn`c+=m!ZjRpX&3lDh z+24a)&GWO>MwagrXsq*mn}!|b^Yp>4W@ArVep>V)HCyJ}_~`cHf3u-xOL@NgytnI= zY>tj+t=isJU4NGMBL^wZimsQA*S@w#_Y3|}{Cm><(P^L9E1%YFSbzWB)znT1*V_O9 z00000000000000000000000000000000000000000000000000000000000000000 z0000000000000000000000000000000000000000000000000000000000000002M z|7Dr|H*xNeTipKpuXFofvbgwOQ#(Qb-bfJv000000000000000008_?h~Cb;dVuTS zUgwT{uCe&e+nE3W00000000000000000000000000000000000000000000000000 z00000{?}Chf7Ew*sb{O(t!L{V^LqO4{Qsx}00000fd7Xj6afGL000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z00000000000000000000000000000000000000000000000000000000000000000 z0000000000000000000000000000000000000000000000000000000007|sbD49= zl2$iknf}vNInh7;waEF(p2}aW@`-|eGZZ#mVcuktv{`n@|ud1jRNRbCwB zPb+VZme;-2&Fma4Z$IU}QQlv9c=Y>2m7Amd8Rc2g@_MwoyYeXaRPGfm?*QdtE?L_> z{61M$0#eGXI}6;1zLk;C*|^f^d*vgI0mdMPikoa@t1d3m({!&=?X8*F(hD}sP^|$GJX!?sq4%2_F&%v$k?j<(;bDG}Xnhqc8(r>L){+M>DBW&lclWxCj e_qN;b>fPeMyP8_R>_)0M0002+fBKrrx&H#xQ9kSd literal 0 Hc-jL100001 diff --git a/tests/intl.tests b/tests/intl.tests index 3a9111a46..0dc33cbb0 100644 --- a/tests/intl.tests +++ b/tests/intl.tests @@ -1,4 +1,4 @@ -LANG=en_US.UTF-8 +export LANG=en_US.UTF-8 a=$'\303\251' diff --git a/tests/intl.tests~ b/tests/intl.tests~ index 7e3cb37d0..3a9111a46 100644 --- a/tests/intl.tests~ +++ b/tests/intl.tests~ @@ -21,8 +21,8 @@ a=$(printf '%b' 'A\303\251B') IFS=$(printf '%b' '\303\251') case "$a" in -"A${IFS}B") echo yes ;; -*) echo no ;; +"A${IFS}B") echo ok 1 ;; +*) echo bad 1 ;; esac set $a diff --git a/tests/shopt.right b/tests/shopt.right index 605a8f01b..ca9a2c344 100644 --- a/tests/shopt.right +++ b/tests/shopt.right @@ -15,8 +15,8 @@ shopt -s extquote shopt -u failglob shopt -s force_fignore shopt -u gnu_errfmt -shopt -u histreedit shopt -u histappend +shopt -u histreedit shopt -u histverify shopt -s hostcomplete shopt -u huponexit @@ -58,8 +58,8 @@ shopt -u extdebug shopt -u extglob shopt -u failglob shopt -u gnu_errfmt -shopt -u histreedit shopt -u histappend +shopt -u histreedit shopt -u histverify shopt -u huponexit shopt -u lithist @@ -81,8 +81,8 @@ extdebug off extglob off failglob off gnu_errfmt off -histreedit off histappend off +histreedit off histverify off huponexit off lithist off -- 2.47.3