Mercurial > hg
comparison tests/test-config.t @ 46867:915a60bf3cb6
tests: handle Windows file separator differences in test-config.t
Differential Revision: https://phab.mercurial-scm.org/D10299
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sat, 03 Apr 2021 20:25:37 -0400 |
parents | 821929d59e01 |
children | 3e381eb557f3 |
comparison
equal
deleted
inserted
replaced
46866:7ce8b4d2bd55 | 46867:915a60bf3cb6 |
---|---|
1 Windows needs ';' as a file separator in an environment variable, and MSYS | |
2 doesn't automatically convert it in every case. | |
3 | |
4 #if windows | |
5 $ path_list_var() { | |
6 > echo $1 | sed 's/:/;/' | |
7 > } | |
8 #else | |
9 $ path_list_var() { | |
10 > echo $1 | |
11 > } | |
12 #endif | |
13 | |
14 | |
1 hide outer repo | 15 hide outer repo |
2 $ hg init | 16 $ hg init |
3 | 17 |
4 Invalid syntax: no value | 18 Invalid syntax: no value |
5 | 19 |
444 Simple order checking | 458 Simple order checking |
445 --------------------- | 459 --------------------- |
446 | 460 |
447 If file B is read after file A, value from B overwrite value from A. | 461 If file B is read after file A, value from B overwrite value from A. |
448 | 462 |
449 $ HGRCPATH="file-A.rc:file-B.rc" hg config config-test.basic | 463 $ HGRCPATH=`path_list_var "file-A.rc:file-B.rc"` hg config config-test.basic |
450 value-B | 464 value-B |
451 | 465 |
452 Ordering from include | 466 Ordering from include |
453 --------------------- | 467 --------------------- |
454 | 468 |
460 value-A | 474 value-A |
461 | 475 |
462 command line override | 476 command line override |
463 --------------------- | 477 --------------------- |
464 | 478 |
465 $ HGRCPATH="file-A.rc:file-B.rc" hg config config-test.basic --config config-test.basic=value-CLI | 479 $ HGRCPATH=`path_list_var "file-A.rc:file-B.rc"` hg config config-test.basic --config config-test.basic=value-CLI |
466 value-CLI | 480 value-CLI |
467 | 481 |
468 Alias ordering | 482 Alias ordering |
469 -------------- | 483 -------------- |
470 | 484 |
478 | 492 |
479 $ HGRCPATH="file-A.rc" hg log -r . | 493 $ HGRCPATH="file-A.rc" hg log -r . |
480 value-A | 494 value-A |
481 $ HGRCPATH="file-B.rc" hg log -r . | 495 $ HGRCPATH="file-B.rc" hg log -r . |
482 value-B | 496 value-B |
483 $ HGRCPATH="file-A.rc:file-B.rc" hg log -r . | 497 $ HGRCPATH=`path_list_var "file-A.rc:file-B.rc"` hg log -r . |
484 value-B | 498 value-B |
485 | 499 |
486 Alias and include | 500 Alias and include |
487 ----------------- | 501 ----------------- |
488 | 502 |
495 value-included | 509 value-included |
496 | 510 |
497 command line override | 511 command line override |
498 --------------------- | 512 --------------------- |
499 | 513 |
500 $ HGRCPATH="file-A.rc:file-B.rc" hg log -r . --config ui.logtemplate="value-CLI\n" | 514 $ HGRCPATH=`path_list_var "file-A.rc:file-B.rc"` hg log -r . --config ui.logtemplate="value-CLI\n" |
501 value-CLI | 515 value-CLI |