diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 5 | ||||
-rw-r--r-- | test/funstack.awk | 12 | ||||
-rw-r--r-- | test/gsubtst5.ok | 1 | ||||
-rw-r--r-- | test/igncfs.awk | 2 | ||||
-rw-r--r-- | test/longwrds.awk | 2 | ||||
-rw-r--r-- | test/ofmtbig.awk | 3 | ||||
-rw-r--r-- | test/subamp.awk | 2 |
7 files changed, 19 insertions, 8 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index 2ad540dc..667fc755 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 29 21:52:49 2010 Arnold D. Robbins <arnold@skeeve.com> + + * funstack.awk, gsubtst5.ok, igncfs.awk, longwrds.awk, + ofmtbig.awk, subamp.awk: Fix regexes to remove ranges. + Fri Nov 12 11:58:40 2010 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (dumpvars): New test. diff --git a/test/funstack.awk b/test/funstack.awk index 9a630213..95456903 100644 --- a/test/funstack.awk +++ b/test/funstack.awk @@ -663,7 +663,8 @@ function html_header() function html_label( label) { label = Volume "(" Number "):" Month ":" Year - gsub(/[^A-Za-z0-9():,;.\/\-]/,"",label) + # gsub(/[^A-Za-z0-9():,;.\/\-]/,"",label) + gsub(/[^[:alnum:]():,;.\/\-]/,"",label) return (label) } @@ -673,7 +674,8 @@ function html_length(s) if (HTML) { gsub(/<\/?[^>]*>/,"",s) # remove SGML tags - gsub(/&[A-Za-z0-9]+;/,"",s) # remove SGML entities + # gsub(/&[A-Za-z0-9]+;/,"",s) # remove SGML entities + gsub(/&[[:alnum:]]+;/,"",s) # remove SGML entities } return (length(s)) } @@ -949,8 +951,10 @@ function TeX_to_HTML_nonmath(s) { gsub(/\\\&/, "\\&", s) # reduce TeX ampersands to conventional ones - gsub(/\\[a-z][a-z] +/,"",s) # remove TeX font changes - gsub(/\\[^A-Za-z]/,"",s) # remove remaining TeX control symbols + #gsub(/\\[a-z][a-z] +/,"",s) # remove TeX font changes + gsub(/\\[[:lower:]][[:lower:]] +/,"",s) # remove TeX font changes + #gsub(/\\[^A-Za-z]/,"",s) # remove remaining TeX control symbols + gsub(/\\[^[:alpha:]]/,"",s) # remove remaining TeX control symbols } } return (s) diff --git a/test/gsubtst5.ok b/test/gsubtst5.ok index b038c8af..2119b6c6 100644 --- a/test/gsubtst5.ok +++ b/test/gsubtst5.ok @@ -1 +1,2 @@ +gawk: gsubtst5.awk:95: warning: range of the form `["-\]' is locale dependant ThisIsaTitleMyTitle diff --git a/test/igncfs.awk b/test/igncfs.awk index ebb58b24..5e3c6b66 100644 --- a/test/igncfs.awk +++ b/test/igncfs.awk @@ -1,6 +1,6 @@ BEGIN { IGNORECASE=1 - FS="[^a-z]+" + FS="[^[:lower:]]+" } { for (i=1; i<NF; i++) printf "%s, ", $i diff --git a/test/longwrds.awk b/test/longwrds.awk index d4b4d92d..77654bb0 100644 --- a/test/longwrds.awk +++ b/test/longwrds.awk @@ -9,7 +9,7 @@ BEGIN { { for (i = 1; i <= NF; i++) { tmp = tolower($i) - if (0 != (pos = match(tmp, /([a-z]|-)+/))) + if (0 != (pos = match(tmp, /([[:lower:]]|-)+/))) used[substr(tmp, pos, RLENGTH)] = 1 } } diff --git a/test/ofmtbig.awk b/test/ofmtbig.awk index f1b23849..df4f9bb0 100644 --- a/test/ofmtbig.awk +++ b/test/ofmtbig.awk @@ -88,7 +88,8 @@ $0 ~ /^[0-9]+$/ { next } -$0 ~ /^[a-z]+/ { +# $0 ~ /^[a-z]+/ { +$0 ~ /^[[:lower:]]+/ { print dir, highest, lowest dir = $0 lowest = big diff --git a/test/subamp.awk b/test/subamp.awk index 2638e6ea..731726cf 100644 --- a/test/subamp.awk +++ b/test/subamp.awk @@ -1 +1 @@ -{ sub(/[a-z]/, "&") ; print } +{ sub(/[[:lower:]]/, "&") ; print } |