diff options
author | Karel Zak | 2018-01-22 15:46:01 +0100 |
---|---|---|
committer | Karel Zak | 2018-01-22 16:00:39 +0100 |
commit | a88564a061766026b7b80c85176ae7a30eb0d9be (patch) | |
tree | acdafe4e6e44ba6081dd36671d2122c197d62b0b | |
parent | tests: use subtests for sep1752w test (diff) | |
download | kernel-qcow2-util-linux-a88564a061766026b7b80c85176ae7a30eb0d9be.tar.gz kernel-qcow2-util-linux-a88564a061766026b7b80c85176ae7a30eb0d9be.tar.xz kernel-qcow2-util-linux-a88564a061766026b7b80c85176ae7a30eb0d9be.zip |
tests: merge sep1752 cal(1) tests
* merge tests
* use subtests for cal(1) calls
Signed-off-by: Karel Zak <kzak@redhat.com>
-rw-r--r-- | tests/expected/cal/sep1752 | 249 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1m-month | 9 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1m-year | 36 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1mj-month | 9 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1mj-year | 52 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1mjw-month (renamed from tests/expected/cal/sep1752w-1mjw-month) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1mjw-year (renamed from tests/expected/cal/sep1752w-1mjw-year) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1mw-month (renamed from tests/expected/cal/sep1752w-1mw-month) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1mw-year (renamed from tests/expected/cal/sep1752w-1mw-year) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1s-month | 9 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1s-year | 36 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1sj-month | 9 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1sj-year | 52 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1sjw-month (renamed from tests/expected/cal/sep1752w-1sjw-month) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1sjw-year (renamed from tests/expected/cal/sep1752w-1sjw-year) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1sw-month (renamed from tests/expected/cal/sep1752w-1sw-month) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-1sw-year (renamed from tests/expected/cal/sep1752w-1sw-year) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-3m-month | 9 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-3mj-month | 9 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-3mjw-month (renamed from tests/expected/cal/sep1752w-3mjw-month) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-3mw-month (renamed from tests/expected/cal/sep1752w-3mw-month) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-3s-month | 9 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-3sj-month | 9 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-3sjw-month (renamed from tests/expected/cal/sep1752w-3sjw-month) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-3sw-month (renamed from tests/expected/cal/sep1752w-3sw-month) | 0 | ||||
-rw-r--r-- | tests/expected/cal/sep1752-week-iso (renamed from tests/expected/cal/sep1752w-week-iso) | 0 | ||||
-rwxr-xr-x | tests/ts/cal/sep1752 | 109 | ||||
-rwxr-xr-x | tests/ts/cal/sep1752w | 81 |
28 files changed, 295 insertions, 392 deletions
diff --git a/tests/expected/cal/sep1752 b/tests/expected/cal/sep1752 deleted file mode 100644 index 5b5270245..000000000 --- a/tests/expected/cal/sep1752 +++ /dev/null @@ -1,249 +0,0 @@ - -Gregorian - Monday-based month - September 1752 -Mo Tu We Th Fr Sa Su - 1 2 14 15 16 17 -18 19 20 21 22 23 24 -25 26 27 28 29 30 - - - -Gregorian - Sunday-based month - September 1752 -Su Mo Tu We Th Fr Sa - 1 2 14 15 16 -17 18 19 20 21 22 23 -24 25 26 27 28 29 30 - - - -Julian - Monday-based month - September 1752 -Mon Tue Wed Thu Fri Sat Sun - 245 246 258 259 260 261 -262 263 264 265 266 267 268 -269 270 271 272 273 274 - - - -Julian - Sunday-based month - September 1752 -Sun Mon Tue Wed Thu Fri Sat - 245 246 258 259 260 -261 262 263 264 265 266 267 -268 269 270 271 272 273 274 - - - -Gregorian - Monday-based three months - August 1752 September 1752 October 1752 -Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 2 1 2 14 15 16 17 1 - 3 4 5 6 7 8 9 18 19 20 21 22 23 24 2 3 4 5 6 7 8 -10 11 12 13 14 15 16 25 26 27 28 29 30 9 10 11 12 13 14 15 -17 18 19 20 21 22 23 16 17 18 19 20 21 22 -24 25 26 27 28 29 30 23 24 25 26 27 28 29 -31 30 31 -Gregorian - Sunday-based three months - August 1752 September 1752 October 1752 -Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 1 2 14 15 16 1 2 3 4 5 6 7 - 2 3 4 5 6 7 8 17 18 19 20 21 22 23 8 9 10 11 12 13 14 - 9 10 11 12 13 14 15 24 25 26 27 28 29 30 15 16 17 18 19 20 21 -16 17 18 19 20 21 22 22 23 24 25 26 27 28 -23 24 25 26 27 28 29 29 30 31 -30 31 -Julian - Monday-based three months - August 1752 September 1752 October 1752 -Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 214 215 245 246 258 259 260 261 275 -216 217 218 219 220 221 222 262 263 264 265 266 267 268 276 277 278 279 280 281 282 -223 224 225 226 227 228 229 269 270 271 272 273 274 283 284 285 286 287 288 289 -230 231 232 233 234 235 236 290 291 292 293 294 295 296 -237 238 239 240 241 242 243 297 298 299 300 301 302 303 -244 304 305 -Julian - Sunday-based three months - August 1752 September 1752 October 1752 -Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 214 245 246 258 259 260 275 276 277 278 279 280 281 -215 216 217 218 219 220 221 261 262 263 264 265 266 267 282 283 284 285 286 287 288 -222 223 224 225 226 227 228 268 269 270 271 272 273 274 289 290 291 292 293 294 295 -229 230 231 232 233 234 235 296 297 298 299 300 301 302 -236 237 238 239 240 241 242 303 304 305 -243 244 -Gregorian - Monday-based year - 1752 - - January February March -Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 2 3 4 5 1 2 1 - 6 7 8 9 10 11 12 3 4 5 6 7 8 9 2 3 4 5 6 7 8 -13 14 15 16 17 18 19 10 11 12 13 14 15 16 9 10 11 12 13 14 15 -20 21 22 23 24 25 26 17 18 19 20 21 22 23 16 17 18 19 20 21 22 -27 28 29 30 31 24 25 26 27 28 29 23 24 25 26 27 28 29 - 30 31 - April May June -Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 2 3 4 5 1 2 3 1 2 3 4 5 6 7 - 6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14 -13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21 -20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28 -27 28 29 30 25 26 27 28 29 30 31 29 30 - - July August September -Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 2 3 4 5 1 2 1 2 14 15 16 17 - 6 7 8 9 10 11 12 3 4 5 6 7 8 9 18 19 20 21 22 23 24 -13 14 15 16 17 18 19 10 11 12 13 14 15 16 25 26 27 28 29 30 -20 21 22 23 24 25 26 17 18 19 20 21 22 23 -27 28 29 30 31 24 25 26 27 28 29 30 - 31 - October November December -Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su - 1 1 2 3 4 5 1 2 3 - 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 - 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 -16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 -23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 -30 31 - -Gregorian - Sunday-based year - 1752 - - January February March -Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 2 3 4 1 1 2 3 4 5 6 7 - 5 6 7 8 9 10 11 2 3 4 5 6 7 8 8 9 10 11 12 13 14 -12 13 14 15 16 17 18 9 10 11 12 13 14 15 15 16 17 18 19 20 21 -19 20 21 22 23 24 25 16 17 18 19 20 21 22 22 23 24 25 26 27 28 -26 27 28 29 30 31 23 24 25 26 27 28 29 29 30 31 - - April May June -Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 2 3 4 1 2 1 2 3 4 5 6 - 5 6 7 8 9 10 11 3 4 5 6 7 8 9 7 8 9 10 11 12 13 -12 13 14 15 16 17 18 10 11 12 13 14 15 16 14 15 16 17 18 19 20 -19 20 21 22 23 24 25 17 18 19 20 21 22 23 21 22 23 24 25 26 27 -26 27 28 29 30 24 25 26 27 28 29 30 28 29 30 - 31 - July August September -Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 2 3 4 1 1 2 14 15 16 - 5 6 7 8 9 10 11 2 3 4 5 6 7 8 17 18 19 20 21 22 23 -12 13 14 15 16 17 18 9 10 11 12 13 14 15 24 25 26 27 28 29 30 -19 20 21 22 23 24 25 16 17 18 19 20 21 22 -26 27 28 29 30 31 23 24 25 26 27 28 29 - 30 31 - October November December -Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa - 1 2 3 4 5 6 7 1 2 3 4 1 2 - 8 9 10 11 12 13 14 5 6 7 8 9 10 11 3 4 5 6 7 8 9 -15 16 17 18 19 20 21 12 13 14 15 16 17 18 10 11 12 13 14 15 16 -22 23 24 25 26 27 28 19 20 21 22 23 24 25 17 18 19 20 21 22 23 -29 30 31 26 27 28 29 30 24 25 26 27 28 29 30 - 31 - -Julian - Monday-based year - 1752 - - January February -Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 1 2 3 4 5 32 33 - 6 7 8 9 10 11 12 34 35 36 37 38 39 40 - 13 14 15 16 17 18 19 41 42 43 44 45 46 47 - 20 21 22 23 24 25 26 48 49 50 51 52 53 54 - 27 28 29 30 31 55 56 57 58 59 60 - - March April -Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 61 92 93 94 95 96 - 62 63 64 65 66 67 68 97 98 99 100 101 102 103 - 69 70 71 72 73 74 75 104 105 106 107 108 109 110 - 76 77 78 79 80 81 82 111 112 113 114 115 116 117 - 83 84 85 86 87 88 89 118 119 120 121 - 90 91 - May June -Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 122 123 124 153 154 155 156 157 158 159 -125 126 127 128 129 130 131 160 161 162 163 164 165 166 -132 133 134 135 136 137 138 167 168 169 170 171 172 173 -139 140 141 142 143 144 145 174 175 176 177 178 179 180 -146 147 148 149 150 151 152 181 182 - - July August -Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 183 184 185 186 187 214 215 -188 189 190 191 192 193 194 216 217 218 219 220 221 222 -195 196 197 198 199 200 201 223 224 225 226 227 228 229 -202 203 204 205 206 207 208 230 231 232 233 234 235 236 -209 210 211 212 213 237 238 239 240 241 242 243 - 244 - September October -Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 245 246 258 259 260 261 275 -262 263 264 265 266 267 268 276 277 278 279 280 281 282 -269 270 271 272 273 274 283 284 285 286 287 288 289 - 290 291 292 293 294 295 296 - 297 298 299 300 301 302 303 - 304 305 - November December -Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun - 306 307 308 309 310 336 337 338 -311 312 313 314 315 316 317 339 340 341 342 343 344 345 -318 319 320 321 322 323 324 346 347 348 349 350 351 352 -325 326 327 328 329 330 331 353 354 355 356 357 358 359 -332 333 334 335 360 361 362 363 364 365 366 - - -Julian - Sunday-based year - 1752 - - January February -Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 1 2 3 4 32 - 5 6 7 8 9 10 11 33 34 35 36 37 38 39 - 12 13 14 15 16 17 18 40 41 42 43 44 45 46 - 19 20 21 22 23 24 25 47 48 49 50 51 52 53 - 26 27 28 29 30 31 54 55 56 57 58 59 60 - - March April -Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 61 62 63 64 65 66 67 92 93 94 95 - 68 69 70 71 72 73 74 96 97 98 99 100 101 102 - 75 76 77 78 79 80 81 103 104 105 106 107 108 109 - 82 83 84 85 86 87 88 110 111 112 113 114 115 116 - 89 90 91 117 118 119 120 121 - - May June -Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 122 123 153 154 155 156 157 158 -124 125 126 127 128 129 130 159 160 161 162 163 164 165 -131 132 133 134 135 136 137 166 167 168 169 170 171 172 -138 139 140 141 142 143 144 173 174 175 176 177 178 179 -145 146 147 148 149 150 151 180 181 182 -152 - July August -Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 183 184 185 186 214 -187 188 189 190 191 192 193 215 216 217 218 219 220 221 -194 195 196 197 198 199 200 222 223 224 225 226 227 228 -201 202 203 204 205 206 207 229 230 231 232 233 234 235 -208 209 210 211 212 213 236 237 238 239 240 241 242 - 243 244 - September October -Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 245 246 258 259 260 275 276 277 278 279 280 281 -261 262 263 264 265 266 267 282 283 284 285 286 287 288 -268 269 270 271 272 273 274 289 290 291 292 293 294 295 - 296 297 298 299 300 301 302 - 303 304 305 - - November December -Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat - 306 307 308 309 336 337 -310 311 312 313 314 315 316 338 339 340 341 342 343 344 -317 318 319 320 321 322 323 345 346 347 348 349 350 351 -324 325 326 327 328 329 330 352 353 354 355 356 357 358 -331 332 333 334 335 359 360 361 362 363 364 365 - 366 - diff --git a/tests/expected/cal/sep1752-1m-month b/tests/expected/cal/sep1752-1m-month new file mode 100644 index 000000000..9e27f687f --- /dev/null +++ b/tests/expected/cal/sep1752-1m-month @@ -0,0 +1,9 @@ +Gregorian - Monday-based month + September 1752 +Mo Tu We Th Fr Sa Su + 1 2 14 15 16 17 +18 19 20 21 22 23 24 +25 26 27 28 29 30 + + + diff --git a/tests/expected/cal/sep1752-1m-year b/tests/expected/cal/sep1752-1m-year new file mode 100644 index 000000000..cddb0df91 --- /dev/null +++ b/tests/expected/cal/sep1752-1m-year @@ -0,0 +1,36 @@ +Gregorian - Monday-based year + 1752 + + January February March +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 3 4 5 1 2 1 + 6 7 8 9 10 11 12 3 4 5 6 7 8 9 2 3 4 5 6 7 8 +13 14 15 16 17 18 19 10 11 12 13 14 15 16 9 10 11 12 13 14 15 +20 21 22 23 24 25 26 17 18 19 20 21 22 23 16 17 18 19 20 21 22 +27 28 29 30 31 24 25 26 27 28 29 23 24 25 26 27 28 29 + 30 31 + April May June +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 3 4 5 1 2 3 1 2 3 4 5 6 7 + 6 7 8 9 10 11 12 4 5 6 7 8 9 10 8 9 10 11 12 13 14 +13 14 15 16 17 18 19 11 12 13 14 15 16 17 15 16 17 18 19 20 21 +20 21 22 23 24 25 26 18 19 20 21 22 23 24 22 23 24 25 26 27 28 +27 28 29 30 25 26 27 28 29 30 31 29 30 + + July August September +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 3 4 5 1 2 1 2 14 15 16 17 + 6 7 8 9 10 11 12 3 4 5 6 7 8 9 18 19 20 21 22 23 24 +13 14 15 16 17 18 19 10 11 12 13 14 15 16 25 26 27 28 29 30 +20 21 22 23 24 25 26 17 18 19 20 21 22 23 +27 28 29 30 31 24 25 26 27 28 29 30 + 31 + October November December +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 1 2 3 4 5 1 2 3 + 2 3 4 5 6 7 8 6 7 8 9 10 11 12 4 5 6 7 8 9 10 + 9 10 11 12 13 14 15 13 14 15 16 17 18 19 11 12 13 14 15 16 17 +16 17 18 19 20 21 22 20 21 22 23 24 25 26 18 19 20 21 22 23 24 +23 24 25 26 27 28 29 27 28 29 30 25 26 27 28 29 30 31 +30 31 + diff --git a/tests/expected/cal/sep1752-1mj-month b/tests/expected/cal/sep1752-1mj-month new file mode 100644 index 000000000..0b34f09b7 --- /dev/null +++ b/tests/expected/cal/sep1752-1mj-month @@ -0,0 +1,9 @@ +Julian - Monday-based month + September 1752 +Mon Tue Wed Thu Fri Sat Sun + 245 246 258 259 260 261 +262 263 264 265 266 267 268 +269 270 271 272 273 274 + + + diff --git a/tests/expected/cal/sep1752-1mj-year b/tests/expected/cal/sep1752-1mj-year new file mode 100644 index 000000000..3e6965e8c --- /dev/null +++ b/tests/expected/cal/sep1752-1mj-year @@ -0,0 +1,52 @@ +Julian - Monday-based year + 1752 + + January February +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 1 2 3 4 5 32 33 + 6 7 8 9 10 11 12 34 35 36 37 38 39 40 + 13 14 15 16 17 18 19 41 42 43 44 45 46 47 + 20 21 22 23 24 25 26 48 49 50 51 52 53 54 + 27 28 29 30 31 55 56 57 58 59 60 + + March April +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 61 92 93 94 95 96 + 62 63 64 65 66 67 68 97 98 99 100 101 102 103 + 69 70 71 72 73 74 75 104 105 106 107 108 109 110 + 76 77 78 79 80 81 82 111 112 113 114 115 116 117 + 83 84 85 86 87 88 89 118 119 120 121 + 90 91 + May June +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 122 123 124 153 154 155 156 157 158 159 +125 126 127 128 129 130 131 160 161 162 163 164 165 166 +132 133 134 135 136 137 138 167 168 169 170 171 172 173 +139 140 141 142 143 144 145 174 175 176 177 178 179 180 +146 147 148 149 150 151 152 181 182 + + July August +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 183 184 185 186 187 214 215 +188 189 190 191 192 193 194 216 217 218 219 220 221 222 +195 196 197 198 199 200 201 223 224 225 226 227 228 229 +202 203 204 205 206 207 208 230 231 232 233 234 235 236 +209 210 211 212 213 237 238 239 240 241 242 243 + 244 + September October +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 245 246 258 259 260 261 275 +262 263 264 265 266 267 268 276 277 278 279 280 281 282 +269 270 271 272 273 274 283 284 285 286 287 288 289 + 290 291 292 293 294 295 296 + 297 298 299 300 301 302 303 + 304 305 + November December +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 306 307 308 309 310 336 337 338 +311 312 313 314 315 316 317 339 340 341 342 343 344 345 +318 319 320 321 322 323 324 346 347 348 349 350 351 352 +325 326 327 328 329 330 331 353 354 355 356 357 358 359 +332 333 334 335 360 361 362 363 364 365 366 + + diff --git a/tests/expected/cal/sep1752w-1mjw-month b/tests/expected/cal/sep1752-1mjw-month index 3624288a2..3624288a2 100644 --- a/tests/expected/cal/sep1752w-1mjw-month +++ b/tests/expected/cal/sep1752-1mjw-month diff --git a/tests/expected/cal/sep1752w-1mjw-year b/tests/expected/cal/sep1752-1mjw-year index a168451f7..a168451f7 100644 --- a/tests/expected/cal/sep1752w-1mjw-year +++ b/tests/expected/cal/sep1752-1mjw-year diff --git a/tests/expected/cal/sep1752w-1mw-month b/tests/expected/cal/sep1752-1mw-month index cef2eb17a..cef2eb17a 100644 --- a/tests/expected/cal/sep1752w-1mw-month +++ b/tests/expected/cal/sep1752-1mw-month diff --git a/tests/expected/cal/sep1752w-1mw-year b/tests/expected/cal/sep1752-1mw-year index 3f5cd7fb3..3f5cd7fb3 100644 --- a/tests/expected/cal/sep1752w-1mw-year +++ b/tests/expected/cal/sep1752-1mw-year diff --git a/tests/expected/cal/sep1752-1s-month b/tests/expected/cal/sep1752-1s-month new file mode 100644 index 000000000..feaa16fad --- /dev/null +++ b/tests/expected/cal/sep1752-1s-month @@ -0,0 +1,9 @@ +Gregorian - Sunday-based month + September 1752 +Su Mo Tu We Th Fr Sa + 1 2 14 15 16 +17 18 19 20 21 22 23 +24 25 26 27 28 29 30 + + + diff --git a/tests/expected/cal/sep1752-1s-year b/tests/expected/cal/sep1752-1s-year new file mode 100644 index 000000000..818f1148b --- /dev/null +++ b/tests/expected/cal/sep1752-1s-year @@ -0,0 +1,36 @@ +Gregorian - Sunday-based year + 1752 + + January February March +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 1 2 3 4 5 6 7 + 5 6 7 8 9 10 11 2 3 4 5 6 7 8 8 9 10 11 12 13 14 +12 13 14 15 16 17 18 9 10 11 12 13 14 15 15 16 17 18 19 20 21 +19 20 21 22 23 24 25 16 17 18 19 20 21 22 22 23 24 25 26 27 28 +26 27 28 29 30 31 23 24 25 26 27 28 29 29 30 31 + + April May June +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 2 1 2 3 4 5 6 + 5 6 7 8 9 10 11 3 4 5 6 7 8 9 7 8 9 10 11 12 13 +12 13 14 15 16 17 18 10 11 12 13 14 15 16 14 15 16 17 18 19 20 +19 20 21 22 23 24 25 17 18 19 20 21 22 23 21 22 23 24 25 26 27 +26 27 28 29 30 24 25 26 27 28 29 30 28 29 30 + 31 + July August September +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 1 1 2 14 15 16 + 5 6 7 8 9 10 11 2 3 4 5 6 7 8 17 18 19 20 21 22 23 +12 13 14 15 16 17 18 9 10 11 12 13 14 15 24 25 26 27 28 29 30 +19 20 21 22 23 24 25 16 17 18 19 20 21 22 +26 27 28 29 30 31 23 24 25 26 27 28 29 + 30 31 + October November December +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 2 3 4 5 6 7 1 2 3 4 1 2 + 8 9 10 11 12 13 14 5 6 7 8 9 10 11 3 4 5 6 7 8 9 +15 16 17 18 19 20 21 12 13 14 15 16 17 18 10 11 12 13 14 15 16 +22 23 24 25 26 27 28 19 20 21 22 23 24 25 17 18 19 20 21 22 23 +29 30 31 26 27 28 29 30 24 25 26 27 28 29 30 + 31 + diff --git a/tests/expected/cal/sep1752-1sj-month b/tests/expected/cal/sep1752-1sj-month new file mode 100644 index 000000000..252307dc6 --- /dev/null +++ b/tests/expected/cal/sep1752-1sj-month @@ -0,0 +1,9 @@ +Julian - Sunday-based month + September 1752 +Sun Mon Tue Wed Thu Fri Sat + 245 246 258 259 260 +261 262 263 264 265 266 267 +268 269 270 271 272 273 274 + + + diff --git a/tests/expected/cal/sep1752-1sj-year b/tests/expected/cal/sep1752-1sj-year new file mode 100644 index 000000000..48e061abc --- /dev/null +++ b/tests/expected/cal/sep1752-1sj-year @@ -0,0 +1,52 @@ +Julian - Sunday-based year + 1752 + + January February +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 1 2 3 4 32 + 5 6 7 8 9 10 11 33 34 35 36 37 38 39 + 12 13 14 15 16 17 18 40 41 42 43 44 45 46 + 19 20 21 22 23 24 25 47 48 49 50 51 52 53 + 26 27 28 29 30 31 54 55 56 57 58 59 60 + + March April +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 61 62 63 64 65 66 67 92 93 94 95 + 68 69 70 71 72 73 74 96 97 98 99 100 101 102 + 75 76 77 78 79 80 81 103 104 105 106 107 108 109 + 82 83 84 85 86 87 88 110 111 112 113 114 115 116 + 89 90 91 117 118 119 120 121 + + May June +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 122 123 153 154 155 156 157 158 +124 125 126 127 128 129 130 159 160 161 162 163 164 165 +131 132 133 134 135 136 137 166 167 168 169 170 171 172 +138 139 140 141 142 143 144 173 174 175 176 177 178 179 +145 146 147 148 149 150 151 180 181 182 +152 + July August +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 183 184 185 186 214 +187 188 189 190 191 192 193 215 216 217 218 219 220 221 +194 195 196 197 198 199 200 222 223 224 225 226 227 228 +201 202 203 204 205 206 207 229 230 231 232 233 234 235 +208 209 210 211 212 213 236 237 238 239 240 241 242 + 243 244 + September October +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 245 246 258 259 260 275 276 277 278 279 280 281 +261 262 263 264 265 266 267 282 283 284 285 286 287 288 +268 269 270 271 272 273 274 289 290 291 292 293 294 295 + 296 297 298 299 300 301 302 + 303 304 305 + + November December +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 306 307 308 309 336 337 +310 311 312 313 314 315 316 338 339 340 341 342 343 344 +317 318 319 320 321 322 323 345 346 347 348 349 350 351 +324 325 326 327 328 329 330 352 353 354 355 356 357 358 +331 332 333 334 335 359 360 361 362 363 364 365 + 366 + diff --git a/tests/expected/cal/sep1752w-1sjw-month b/tests/expected/cal/sep1752-1sjw-month index 0d3b2421c..0d3b2421c 100644 --- a/tests/expected/cal/sep1752w-1sjw-month +++ b/tests/expected/cal/sep1752-1sjw-month diff --git a/tests/expected/cal/sep1752w-1sjw-year b/tests/expected/cal/sep1752-1sjw-year index 579ed69f4..579ed69f4 100644 --- a/tests/expected/cal/sep1752w-1sjw-year +++ b/tests/expected/cal/sep1752-1sjw-year diff --git a/tests/expected/cal/sep1752w-1sw-month b/tests/expected/cal/sep1752-1sw-month index c6aabead7..c6aabead7 100644 --- a/tests/expected/cal/sep1752w-1sw-month +++ b/tests/expected/cal/sep1752-1sw-month diff --git a/tests/expected/cal/sep1752w-1sw-year b/tests/expected/cal/sep1752-1sw-year index 3acd068a1..3acd068a1 100644 --- a/tests/expected/cal/sep1752w-1sw-year +++ b/tests/expected/cal/sep1752-1sw-year diff --git a/tests/expected/cal/sep1752-3m-month b/tests/expected/cal/sep1752-3m-month new file mode 100644 index 000000000..eeb6e9ffa --- /dev/null +++ b/tests/expected/cal/sep1752-3m-month @@ -0,0 +1,9 @@ +Gregorian - Monday-based three months + August 1752 September 1752 October 1752 +Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su + 1 2 1 2 14 15 16 17 1 + 3 4 5 6 7 8 9 18 19 20 21 22 23 24 2 3 4 5 6 7 8 +10 11 12 13 14 15 16 25 26 27 28 29 30 9 10 11 12 13 14 15 +17 18 19 20 21 22 23 16 17 18 19 20 21 22 +24 25 26 27 28 29 30 23 24 25 26 27 28 29 +31 30 31 diff --git a/tests/expected/cal/sep1752-3mj-month b/tests/expected/cal/sep1752-3mj-month new file mode 100644 index 000000000..84cb50734 --- /dev/null +++ b/tests/expected/cal/sep1752-3mj-month @@ -0,0 +1,9 @@ +Julian - Monday-based three months + August 1752 September 1752 October 1752 +Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun + 214 215 245 246 258 259 260 261 275 +216 217 218 219 220 221 222 262 263 264 265 266 267 268 276 277 278 279 280 281 282 +223 224 225 226 227 228 229 269 270 271 272 273 274 283 284 285 286 287 288 289 +230 231 232 233 234 235 236 290 291 292 293 294 295 296 +237 238 239 240 241 242 243 297 298 299 300 301 302 303 +244 304 305 diff --git a/tests/expected/cal/sep1752w-3mjw-month b/tests/expected/cal/sep1752-3mjw-month index e3c54ac30..e3c54ac30 100644 --- a/tests/expected/cal/sep1752w-3mjw-month +++ b/tests/expected/cal/sep1752-3mjw-month diff --git a/tests/expected/cal/sep1752w-3mw-month b/tests/expected/cal/sep1752-3mw-month index 88efe106f..88efe106f 100644 --- a/tests/expected/cal/sep1752w-3mw-month +++ b/tests/expected/cal/sep1752-3mw-month diff --git a/tests/expected/cal/sep1752-3s-month b/tests/expected/cal/sep1752-3s-month new file mode 100644 index 000000000..15fe8c9fb --- /dev/null +++ b/tests/expected/cal/sep1752-3s-month @@ -0,0 +1,9 @@ +Gregorian - Sunday-based three months + August 1752 September 1752 October 1752 +Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa Su Mo Tu We Th Fr Sa + 1 1 2 14 15 16 1 2 3 4 5 6 7 + 2 3 4 5 6 7 8 17 18 19 20 21 22 23 8 9 10 11 12 13 14 + 9 10 11 12 13 14 15 24 25 26 27 28 29 30 15 16 17 18 19 20 21 +16 17 18 19 20 21 22 22 23 24 25 26 27 28 +23 24 25 26 27 28 29 29 30 31 +30 31 diff --git a/tests/expected/cal/sep1752-3sj-month b/tests/expected/cal/sep1752-3sj-month new file mode 100644 index 000000000..633b2c31a --- /dev/null +++ b/tests/expected/cal/sep1752-3sj-month @@ -0,0 +1,9 @@ +Julian - Sunday-based three months + August 1752 September 1752 October 1752 +Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu Fri Sat + 214 245 246 258 259 260 275 276 277 278 279 280 281 +215 216 217 218 219 220 221 261 262 263 264 265 266 267 282 283 284 285 286 287 288 +222 223 224 225 226 227 228 268 269 270 271 272 273 274 289 290 291 292 293 294 295 +229 230 231 232 233 234 235 296 297 298 299 300 301 302 +236 237 238 239 240 241 242 303 304 305 +243 244 diff --git a/tests/expected/cal/sep1752w-3sjw-month b/tests/expected/cal/sep1752-3sjw-month index 32a321f0d..32a321f0d 100644 --- a/tests/expected/cal/sep1752w-3sjw-month +++ b/tests/expected/cal/sep1752-3sjw-month diff --git a/tests/expected/cal/sep1752w-3sw-month b/tests/expected/cal/sep1752-3sw-month index 60d6a16b6..60d6a16b6 100644 --- a/tests/expected/cal/sep1752w-3sw-month +++ b/tests/expected/cal/sep1752-3sw-month diff --git a/tests/expected/cal/sep1752w-week-iso b/tests/expected/cal/sep1752-week-iso index 7a686911e..7a686911e 100644 --- a/tests/expected/cal/sep1752w-week-iso +++ b/tests/expected/cal/sep1752-week-iso diff --git a/tests/ts/cal/sep1752 b/tests/ts/cal/sep1752 index 8db7e3cac..986f01a60 100755 --- a/tests/ts/cal/sep1752 +++ b/tests/ts/cal/sep1752 @@ -26,73 +26,58 @@ USETERM=$( ts_has_option "useterm" "$*" ) MYMONTH="09 1752" MYYEAR="1752" -[ "$USETERM" == "yes" ] && TS_VERBOSE="yes" -ts_log "" +function call_cal_simple { + ts_log "$1" + shift + if [ "$USETERM" == "yes" ]; then + $TS_CMD_CAL "$@" + fi + $TS_CMD_CAL "$@" >> $TS_OUTPUT +} +function call_cal { + local testname=$(echo "$2" | sed 's/-//g') -ts_log "Gregorian - Monday-based month" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -1m -fi -$TS_CMD_CAL -1m $MYMONTH >> $TS_OUTPUT -ts_log "Gregorian - Sunday-based month" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -1s $MYMONTH -fi -$TS_CMD_CAL -1s $MYMONTH >> $TS_OUTPUT -ts_log "Julian - Monday-based month" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -1mj $MYMONTH -fi -$TS_CMD_CAL -1mj $MYMONTH >> $TS_OUTPUT -ts_log "Julian - Sunday-based month" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -1sj $MYMONTH -fi -$TS_CMD_CAL -1sj $MYMONTH >> $TS_OUTPUT + if [ "$3" == "$MYYEAR" ]; then + testname="${testname}-year" + else + testname="${testname}-month" + fi + ts_init_subtest "$testname" + call_cal_simple "$@" + ts_finalize_subtest +} -ts_log "Gregorian - Monday-based three months" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -3m -fi -$TS_CMD_CAL -3m $MYMONTH >> $TS_OUTPUT -ts_log "Gregorian - Sunday-based three months" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -3s $MYMONTH -fi -$TS_CMD_CAL -3s $MYMONTH >> $TS_OUTPUT -ts_log "Julian - Monday-based three months" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -3mj $MYMONTH -fi -$TS_CMD_CAL -3mj $MYMONTH >> $TS_OUTPUT -ts_log "Julian - Sunday-based three months" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -3sj $MYMONTH -fi -$TS_CMD_CAL -3sj $MYMONTH >> $TS_OUTPUT +call_cal "Gregorian - Monday-based month with week numbers" -1mw $MYMONTH +call_cal "Gregorian - Sunday-based month with week numbers" -1sw $MYMONTH +call_cal "Julian - Monday-based month with week numbers" -1mjw $MYMONTH +call_cal "Julian - Sunday-based month with week numbers" -1sjw $MYMONTH +call_cal "Gregorian - Monday-based three months with week numbers" -3mw $MYMONTH +call_cal "Gregorian - Sunday-based three months with week numbers" -3sw $MYMONTH +call_cal "Julian - Monday-based three months with week numbers" -3mjw $MYMONTH +call_cal "Julian - Sunday-based three months with week numbers" -3sjw $MYMONTH +call_cal "Gregorian - Monday-based year with week numbers" -1mw $MYYEAR +call_cal "Gregorian - Sunday-based year with week numbers" -1sw $MYYEAR +call_cal "Julian - Monday-based year with week numbers" -1mjw $MYYEAR +call_cal "Julian - Sunday-based year with week numbers" -1sjw $MYYEAR -ts_log "Gregorian - Monday-based year" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -1m $MYYEAR -fi -$TS_CMD_CAL -1m $MYYEAR >> $TS_OUTPUT -ts_log "Gregorian - Sunday-based year" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -1s $MYYEAR -fi -$TS_CMD_CAL -1s $MYYEAR >> $TS_OUTPUT -ts_log "Julian - Monday-based year" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -1mj $MYYEAR -fi -$TS_CMD_CAL -1mj $MYYEAR >> $TS_OUTPUT -ts_log "Julian - Sunday-based year" -if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL -1sj $MYYEAR -fi -$TS_CMD_CAL -1sj $MYYEAR >> $TS_OUTPUT +ts_init_subtest "week-iso" +call_cal_simple "Gregorian - address by week number" --week=40 --iso $MYYEAR +ts_finalize_subtest + +call_cal "Gregorian - Monday-based month" -1m $MYMONTH +call_cal "Gregorian - Sunday-based month" -1s $MYMONTH +call_cal "Julian - Monday-based month" -1mj $MYMONTH +call_cal "Julian - Sunday-based month" -1sj $MYMONTH +call_cal "Gregorian - Monday-based three months" -3m $MYMONTH +call_cal "Gregorian - Sunday-based three months" -3s $MYMONTH +call_cal "Julian - Monday-based three months" -3mj $MYMONTH +call_cal "Julian - Sunday-based three months" -3sj $MYMONTH +call_cal "Gregorian - Monday-based year" -1m $MYYEAR +call_cal "Gregorian - Sunday-based year" -1s $MYYEAR +call_cal "Julian - Monday-based year" -1mj $MYYEAR +call_cal "Julian - Sunday-based year" -1sj $MYYEAR ts_finalize diff --git a/tests/ts/cal/sep1752w b/tests/ts/cal/sep1752w deleted file mode 100755 index a3e15550d..000000000 --- a/tests/ts/cal/sep1752w +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/bash - -# This file is part of util-linux. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This file is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -TS_TOPDIR="${0%/*}/../.." -TS_DESC="September 1752 with week numbers" - -. $TS_TOPDIR/functions.sh -ts_init "$*" - -ts_check_test_command "$TS_CMD_CAL" - -export TERM=linux - -USETERM=$( ts_has_option "useterm" "$*" ) -MYMONTH="09 1752" -MYYEAR="1752" - -function call_cal_simple { - ts_log "$1" - shift - if [ "$USETERM" == "yes" ]; then - $TS_CMD_CAL "$@" - fi - $TS_CMD_CAL "$@" >> $TS_OUTPUT -} - -function call_cal { - local testname=$(echo "$2" | sed 's/-//g') - - if [ "$3" == "$MYYEAR" ]; then - testname="${testname}-year" - else - testname="${testname}-month" - fi - - ts_init_subtest "$testname" - call_cal_simple "$@" - ts_finalize_subtest -} - - -call_cal "Gregorian - Monday-based month with week numbers" -1mw $MYMONTH - -call_cal "Gregorian - Sunday-based month with week numbers" -1sw $MYMONTH - -call_cal "Julian - Monday-based month with week numbers" -1mjw $MYMONTH - -call_cal "Julian - Sunday-based month with week numbers" -1sjw $MYMONTH - -call_cal "Gregorian - Monday-based three months with week numbers" -3mw $MYMONTH - -call_cal "Gregorian - Sunday-based three months with week numbers" -3sw $MYMONTH - -call_cal "Julian - Monday-based three months with week numbers" -3mjw $MYMONTH - -call_cal "Julian - Sunday-based three months with week numbers" -3sjw $MYMONTH - -call_cal "Gregorian - Monday-based year with week numbers" -1mw $MYYEAR - -call_cal "Gregorian - Sunday-based year with week numbers" -1sw $MYYEAR - -call_cal "Julian - Monday-based year with week numbers" -1mjw $MYYEAR - -call_cal "Julian - Sunday-based year with week numbers" -1sjw $MYYEAR - -ts_init_subtest "week-iso" -call_cal_simple "Gregorian - address by week number" --week=40 --iso $MYYEAR -ts_finalize_subtest - -ts_finalize |