aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-01-14 13:28:49 +0000
committerRon Yorston <rmy@pobox.com>2021-01-14 13:28:49 +0000
commit89963b524d211e1aec12b72b3725be05ee95c8cf (patch)
tree48590aef62b7ee7686b7898256f29def8d9c50b9 /testsuite
parent9aa5a829070392c2ac6494d0c4e674c0c2bc7dab (diff)
parent2b7c1aa92c68524559a2067609d09309d5c09adc (diff)
downloadbusybox-w32-89963b524d211e1aec12b72b3725be05ee95c8cf.tar.gz
busybox-w32-89963b524d211e1aec12b72b3725be05ee95c8cf.tar.bz2
busybox-w32-89963b524d211e1aec12b72b3725be05ee95c8cf.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/awk.tests14
-rw-r--r--testsuite/dc_add_results.txt36
-rw-r--r--testsuite/dc_decimal_results.txt42
-rw-r--r--testsuite/dc_divmod_results.txt8
-rw-r--r--testsuite/dc_multiply_results.txt4
-rw-r--r--testsuite/dc_power_results.txt72
-rw-r--r--testsuite/dc_subtract_results.txt14
-rwxr-xr-xtestsuite/factor.tests23
-rwxr-xr-xtestsuite/mount.tests2
-rwxr-xr-xtestsuite/xargs.tests2
10 files changed, 127 insertions, 90 deletions
diff --git a/testsuite/awk.tests b/testsuite/awk.tests
index 87f6b5007..92c83d719 100755
--- a/testsuite/awk.tests
+++ b/testsuite/awk.tests
@@ -398,5 +398,19 @@ testing 'awk do not allow "str"++' \
398 '' \ 398 '' \
399 'anything' 399 'anything'
400 400
401# gawk compat: FS regex matches only non-empty separators:
402# with -*, the splitting is NOT f o o b a r, but foo bar:
403testing 'awk FS regex which can match empty string' \
404 "awk -F '-*' '{print \$1 \"-\" \$2 \"=\" \$3 \"*\" \$4}'" \
405 "foo-bar=*\n" \
406 '' \
407 'foo--bar'
408
409# last+1 field should be empty (had a bug where it wasn't)
410testing 'awk $NF is empty' \
411 "awk -F '=+' '{print \$NF}'" \
412 "\n" \
413 '' \
414 'a=====123='
401 415
402exit $FAILCOUNT 416exit $FAILCOUNT
diff --git a/testsuite/dc_add_results.txt b/testsuite/dc_add_results.txt
index 542a62ea3..2d955935f 100644
--- a/testsuite/dc_add_results.txt
+++ b/testsuite/dc_add_results.txt
@@ -9,9 +9,9 @@
91998 91998
10324869359109479 10324869359109479
112378639108055453348401 112378639108055453348401
1278562139406792834691802347619083467219846713490861872324967138636055\ 12785621394067928346918023476190834672198467134908618723249671386360554\
1345508706362018540498696043776980521464405852627147161556994835657433\ 13550870636201854049869604377698052146440585262714716155699483565743300\
1400967298 14967298
151.1 151.1
161.1 161.1
1737842935130118.1187478621432354 1737842935130118.1187478621432354
@@ -20,21 +20,21 @@
20-2 20-2
21-19 21-19
22-1287904651762470260258 22-1287904651762470260258
23100000000000000000000000000000000000000000000000000000000000.0000000\ 23100000000000000000000000000000000000000000000000000000000000.00000000\
2400000000000000000000000000000000000000000000000000000000000000000000\ 24000000000000000000000000000000000000000000000000000000000000000000000\
25000000000000000000000000000000000000000000000 250000000000000000000000000000000000000000000
26100000000000000000000000000000000000000000000000000000000000.0000000\ 26100000000000000000000000000000000000000000000000000000000000.00000000\
2700000000000000000000000000000000000000000000000000000000000000000000\ 27000000000000000000000000000000000000000000000000000000000000000000000\
28000000000000000000000000000000000000000000000 280000000000000000000000000000000000000000000
29100000000000000000000000000000000000000000000000000000000000.0000000\ 29100000000000000000000000000000000000000000000000000000000000.00000000\
3000000000000000000000000000000000000000000000000000000000000000000000\ 30000000000000000000000000000000000000000000000000000000000000000000000\
31000000000000000000000000000000000000000009999 310000000000000000000000000000000000000009999
3299999999999999999999999999999999999999999999999999999999999.99999999\ 3299999999999999999999999999999999999999999999999999999999999.999999999\
3399999999999999999999999999999999999999999999999999000000000000000000\ 33999999999999999999999999999999999999999999999999900000000000000000000\
3400000000000000000000000000000000000000009999 34000000000000000000000000000000000000009999
3599999999999999999999999999999999999990000000000000000000000.00000000\ 3599999999999999999999999999999999999990000000000000000000000.000000000\
3600000000000000000000000000000000000000000000000000000000000000000000\ 36000000000000000000000000000000000000000000000000000000000000000000000\
3700000000000000000000000000000000000000009999 37000000000000000000000000000000000000009999
38122761518 38122761518
39-14338.391079082 39-14338.391079082
40-2422295.6865057444 40-2422295.6865057444
diff --git a/testsuite/dc_decimal_results.txt b/testsuite/dc_decimal_results.txt
index 275d431c6..66bb91ac3 100644
--- a/testsuite/dc_decimal_results.txt
+++ b/testsuite/dc_decimal_results.txt
@@ -9,19 +9,17 @@
9123 9123
107505 107505
111023468723275435238491972521917846 111023468723275435238491972521917846
1243434724324317058673920735170382703980273527090273892739207390379379\ 12434347243243170586739207351703827039802735270902738927392073903793796\
1360379637893607893607893670530278200795207952702873892786172916728961\ 13037963789360789360789367053027820079520795270287389278617291672896178\
1478390789360741897358785738607967926792673752073092537298378279365279\ 143907893607418973587857386079679267926737520730925372983782793652793
153
16-1 15-1
17-203 16-203
18-57 17-57
19-18586 18-18586
20-31378682943772818461924738352952347258 19-31378682943772818461924738352952347258
21-8239456287456735894950672387239865203756982376208346745096273452730\ 20-82394562874567358949506723872398652037569823762083467450962734527309\
2296287563846592384526349872634895763257893467523987578690283762897568\ 21628756384659238452634987263489576325789346752398757869028376289756845\
2345907234875807107108781350187590812735901871502384171023987230138727\ 229072348758071071087813501875908127359018715023841710239872301387278
248
25.123521346523546 23.123521346523546
26.1245923756273856 24.1245923756273856
27-.1024678456387 25-.1024678456387
@@ -31,21 +29,21 @@
31234237468293576.000000000000000000000000000000 29234237468293576.000000000000000000000000000000
3223987623568943567.00000000000000000005677834650000000000000 3023987623568943567.00000000000000000005677834650000000000000
3323856934568940675.000000000000000435676782300000000000000456784 3123856934568940675.000000000000000435676782300000000000000456784
3477567648698496.00000000000000000058767475000000000045856380000000000\ 3277567648698496.000000000000000000587674750000000000458563800000000000\
350000 33000
362348672354968723.237482354600000000000325698739450234689243562387000\ 342348672354968723.2374823546000000000003256987394502346892435623870000\
370000034578 35000034578
38-2354768.000000000000000000000000000000000000 36-2354768.000000000000000000000000000000000000
39-96739874567.000000000347683456 37-96739874567.000000000347683456
40-3764568345.000000000004573845000000347683460 38-3764568345.000000000004573845000000347683460
41-356784356.934568495770004586495678300000000 39-356784356.934568495770004586495678300000000
4274325437345273852773827101738273127312738521733017537073520735207307\ 40743254373452738527738271017382731273127385217330175370735207352073075\
43570358738257390761276072160719802671980267018728630178.7082681027680\ 4170358738257390761276072160719802671980267018728630178.708268102768052\
4452176021786784127612768127086782782176817317820783071097801773817867\ 42176021786784127612768127086782782176817317820783071097801773817867801\
458012767377058785378278207385237085237803278203782037237582795870 432767377058785378278207385237085237803278203782037237582795870
46-7567527327852738512737285378527382578372836789657385273852729836783\ 44-75675273278527385127372853785273825783728367896573852738527298367837\
4772867327835672967385278372637862738627836279863782673862783670.71738\ 452867327835672967385278372637862738627836279863782673862783670.7173817\
4817836173871836718637861073861783678160376017836701860376017810773527\ 46836173871836718637861073861783678160376017836701860376017810773527837\
498372832783728367826738627836278378260736270367362073867097307925 472832783728367826738627836278378260736270367362073867097307925
509812734012837410982345719208345712908357412903587192048571920458712.\ 489812734012837410982345719208345712908357412903587192048571920458712.2\
5123957182459817249058172945781 493957182459817249058172945781
diff --git a/testsuite/dc_divmod_results.txt b/testsuite/dc_divmod_results.txt
index c55e9303d..ee91ee88c 100644
--- a/testsuite/dc_divmod_results.txt
+++ b/testsuite/dc_divmod_results.txt
@@ -58,8 +58,8 @@
58100864416620775.31076855630746548983 58100864416620775.31076855630746548983
59-53336.193401942302558132911110799109649707477 59-53336.193401942302558132911110799109649707477
60.00000000052530099381 60.00000000052530099381
61.0000000000000000000000000000000000000000000000000000000000000001907\ 61.00000000000000000000000000000000000000000000000000000000000000019072\
62266929376630027064745963897 6266929376630027064745963897
6342612515855353136519261264261472677699404182.78776061098893912189 6342612515855353136519261264261472677699404182.78776061098893912189
640 640
650 650
@@ -121,6 +121,6 @@
121100864416620775 121100864416620775
122-3878923750692883.7238596702834756902 122-3878923750692883.7238596702834756902
1230 1230
124.0000000000000000000000000000000000000000000184866017689020776005643\ 124.00000000000000000000000000000000000000000001848660176890207760056433\
1253621086 125621086
12642612515855353136519261264261472677699404182 12642612515855353136519261264261472677699404182
diff --git a/testsuite/dc_multiply_results.txt b/testsuite/dc_multiply_results.txt
index 9666059a5..aaf3a20fc 100644
--- a/testsuite/dc_multiply_results.txt
+++ b/testsuite/dc_multiply_results.txt
@@ -15,8 +15,8 @@
153543531533584430580556128344529291738 153543531533584430580556128344529291738
16568600835566479683035874339053.4411638427543228060 16568600835566479683035874339053.4411638427543228060
177487566285885.8557453089005171423976251098 177487566285885.8557453089005171423976251098
18373846412427291014394738378015501363938345620046.7869650248829232267\ 18373846412427291014394738378015501363938345620046.78696502488292322672\
192297002026819 19297002026819
20-1 20-1
21-2 21-2
22-2751507058396910892 22-2751507058396910892
diff --git a/testsuite/dc_power_results.txt b/testsuite/dc_power_results.txt
index 997f44f59..dc5d56766 100644
--- a/testsuite/dc_power_results.txt
+++ b/testsuite/dc_power_results.txt
@@ -10,15 +10,15 @@
1018927361346 1018927361346
11.23523785962738592635777 11.23523785962738592635777
12328956734869213746.89782398457234 12328956734869213746.89782398457234
1316473742664221279051571200630760751138799221376964991600670000200609\ 13164737426642212790515712006307607511387992213769649916006700002006090\
1408006052596520320731708604393844468006290371918262741885989163144389\ 14800605259652032073170860439384446800629037191826274188598916314438939\
1539367835091560809036359941703341471396407660150658436796925310445979\ 15367835091560809036359941703341471396407660150658436796925310445979213\
1621333166245765946557344383284626113908419359990042883048537750217279\ 16331662457659465573443832846261139084193599900428830485377502172791748\
1717481980123593363177308481941550382845381799410533956718500484099889\ 17198012359336317730848194155038284538179941053395671850048409988961080\
18610805653325917409549921909941664118421333562129 185653325917409549921909941664118421333562129
190 190
2043287877285033571298394739716218787350087163435619825150259705419.98\ 2043287877285033571298394739716218787350087163435619825150259705419.980\
21016445740928054425 2116445740928054425
221.00000000000000000000 221.00000000000000000000
23.50000000000000000000 23.50000000000000000000
24.10000000000000000000 24.10000000000000000000
@@ -31,27 +31,27 @@
311 311
32-2 32-2
334 334
3414997322375665265051328725757939209353051902095893907150382724666290\ 34149973223756652650513287257579392093530519020958939071503827246662904\
3549749481660976421019742616298227588464420182758442163654172400528243\ 35974948166097642101974261629822758846442018275844216365417240052824300\
3600885441207762486233574213374503090372518590691583139696652847404883\ 36885441207762486233574213374503090372518590691583139696652847404883085\
3708573912261119588874308960204159666762789603037188471170006223907416\ 37739122611195888743089602041596667627896030371884711700062239074166049\
3860492840269152716750700089148882139254399347568222390231015487895905\ 38284026915271675070008914888213925439934756822239023101548789590573727\
3973727080561379177721440905866857248917982113340543176658480139248897\ 39080561379177721440905866857248917982113340543176658480139248897548025\
4054802503253413282808814063861470711399810899724515727713334909764746\ 40032534132828088140638614707113998108997245157277133349097647462791029\
4127910290211411231279325882505708287941671508154740003122373284699097\ 41021141123127932588250570828794167150815474000312237328469909778346501\
4278346501539634198926772266511968381368929692275950529960923432771985\ 42539634198926772266511968381368929692275950529960923432771985125971893\
4312597189390708050983487158873301681237787429436264801751664042999180\ 43907080509834871588733016812377874294362648017516640429991803448659818\
443448659818912436089 44912436089
4511478830555358864333472551120140548480416206583184496764727387456058\ 45114788305553588643334725511201405484804162065831844967647273874560587\
46792742209537931243951391229607936 4692742209537931243951391229607936
47-.00000000000000017759 47-.00000000000000017759
48-2067373624686414405470850679965010694114490999957199847684803894306\ 48-20673736246864144054708506799650106941144909999571998476848038943065\
4956243666149296582304582679590231948238805965642713928910384741502707\ 496243666149296582304582679590231948238805965642713928910384741502707.2\
50.23224479257866798694 503224479257866798694
5111606078892843496082360561256965139908586179418605021706789617179085\ 51116060788928434960823605612569651399085861794186050217067896171790858\
5285768049299693425729565480314913006780973928345684673490252494674985\ 52576804929969342572956548031491300678097392834568467349025249467498501\
530186164225375953066263609289359900615361965737717208159874390.293769\ 5386164225375953066263609289359900615361965737717208159874390.293769702\
5470206344604971 5406344604971
55-1.00000000000000000000 55-1.00000000000000000000
561.00000000000000000000 561.00000000000000000000
57-.50000000000000000000 57-.50000000000000000000
@@ -59,14 +59,14 @@
590 590
600 600
61-.00000000000002874159 61-.00000000000002874159
62-1945134149489344891879057554905782841936258356736314337975569799825\ 62-19451341494893448918790575549057828419362583567363143379755697998259\
6394091939572752348215929683891336730843553721422164737465108229034947\ 63409193957275234821592968389133673084355372142216473746510822903494787\
6487333189564755763444242676978610321731298729194092653999616928308494\ 64333189564755763444242676978610321731298729194092653999616928308494264\
6526419468484566422775668903315088810746121307679948574976162519479931\ 65194684845664227756689033150888107461213076799485749761625194799311893\
6618935243698160094347216562490000767121041786977792546155155934655909\ 66524369816009434721656249000076712104178697779254615515593465590914123\
6714123833869470494708767968978717730012864171105540029928688274136791\ 67833869470494708767968978717730012864171105540029928688274136791981750\
6898175053824022144065005509214813689232148489884560100200475909009813\ 68538240221440650055092148136892321484898845601002004759090098133400981\
69340098100705258138.98542904577525702068 6900705258138.98542904577525702068
700 700
710 710
720 720
diff --git a/testsuite/dc_subtract_results.txt b/testsuite/dc_subtract_results.txt
index 9f7726254..0a9762381 100644
--- a/testsuite/dc_subtract_results.txt
+++ b/testsuite/dc_subtract_results.txt
@@ -8,15 +8,15 @@
82874519803456326214611 82874519803456326214611
99000000000000000000000000000000000000001 99000000000000000000000000000000000000001
101 101
119000000000000000000000000000000000000000.000000000000000000000000000\ 119000000000000000000000000000000000000000.0000000000000000000000000000\
1200000001 120000001
13.0000000000000000000000000000000001 13.0000000000000000000000000000000001
149999999999999999999999999999999999999999.999999999999999999999999999\ 149999999999999999999999999999999999999999.9999999999999999999999999999\
159999999999999999999999999999999999999999999999999999999999
1610000000000000000000000000000000000000000.999999999999999999999999999\
1599999999999999999999999999999999999999999999999999999999999 1799999999999999999999999999999999999999999999999999999999999
1610000000000000000000000000000000000000000.99999999999999999999999999\ 1810000000000000000000000000000000000000000.000000000099999999999999999\
17999999999999999999999999999999999999999999999999999999999999 199999999999999999999999999999999999999999999999999
1810000000000000000000000000000000000000000.00000000009999999999999999\
1999999999999999999999999999999999999999999999999999
20-8 20-8
21-182934721309467230894628759280719690 21-182934721309467230894628759280719690
221245723576605103923392087218483 221245723576605103923392087218483
diff --git a/testsuite/factor.tests b/testsuite/factor.tests
index 2cf4a54ce..e404e29c1 100755
--- a/testsuite/factor.tests
+++ b/testsuite/factor.tests
@@ -45,4 +45,27 @@ testing "factor \$((2*3*5*7*11*13*17*19*23*29*31*37*41*43*47))" \
45 "614889782588491410: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47\n" \ 45 "614889782588491410: 2 3 5 7 11 13 17 19 23 29 31 37 41 43 47\n" \
46 "" "" 46 "" ""
47 47
48# Test that square-detection code is not buggy
49testing "factor 2 * 3037000493 * 3037000493" \
50 "factor 18446743988964486098" \
51 "18446743988964486098: 2 3037000493 3037000493\n" \
52 "" ""
53testing "factor 3 * 2479700513 * 2479700513" \
54 "factor 18446743902517389507" \
55 "18446743902517389507: 3 2479700513 2479700513\n" \
56 "" ""
57# including square-of-square cases:
58testing "factor 3 * 37831 * 37831 * 37831 * 37831" \
59 "factor 6144867742934288163" \
60 "6144867742934288163: 3 37831 37831 37831 37831\n" \
61 "" ""
62testing "factor 3 * 13^16" \
63 "factor 1996249827549539523" \
64 "1996249827549539523: 3 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13\n" \
65 "" ""
66testing "factor 13^16" \
67 "factor 665416609183179841" \
68 "665416609183179841: 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13 13\n" \
69 "" ""
70
48exit $FAILCOUNT 71exit $FAILCOUNT
diff --git a/testsuite/mount.tests b/testsuite/mount.tests
index 91c2e8b42..b6d5ebe08 100755
--- a/testsuite/mount.tests
+++ b/testsuite/mount.tests
@@ -34,6 +34,8 @@ umount -d "$testdir" 2>/dev/null
34# file input will be file called "input" 34# file input will be file called "input"
35# test can create a file "actual" instead of writing to stdout 35# test can create a file "actual" instead of writing to stdout
36 36
37# This will always fail on !CONFIG_MANDATORY_FILE_LOCKING kernels
38test "$SKIP_MOUNT_MAND_TESTS" = "1" || \
37testing "mount -o remount,mand" \ 39testing "mount -o remount,mand" \
38"mount -o loop mount.image1m $testdir "\ 40"mount -o loop mount.image1m $testdir "\
39"&& grep -Fc $testdir </proc/mounts "\ 41"&& grep -Fc $testdir </proc/mounts "\
diff --git a/testsuite/xargs.tests b/testsuite/xargs.tests
index e7c7c4b3d..c5e7b99e9 100755
--- a/testsuite/xargs.tests
+++ b/testsuite/xargs.tests
@@ -61,7 +61,7 @@ testing "xargs -n2" \
61 61
62SKIP= 62SKIP=
63 63
64optional FEATURE_XARGS_SUPPORT_QUOTES 64optional FEATURE_XARGS_SUPPORT_QUOTES FEATURE_XARGS_SUPPORT_REPL_STR
65testing "xargs -I skips empty lines and leading whitespace" \ 65testing "xargs -I skips empty lines and leading whitespace" \
66 "xargs -I% echo '[%]'" \ 66 "xargs -I% echo '[%]'" \
67 "[2]\n[4]\n[6 6 ]\n[7]\n" \ 67 "[2]\n[4]\n[6 6 ]\n[7]\n" \