diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-23 10:32:07 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-23 10:32:07 +0100 |
commit | 057806b4e983712ae4c36b6ac4c962049324c3cd (patch) | |
tree | 047f2dd45a16ea91c7c88fc154e798c2f4db800e | |
parent | style(treewide): Refactor (diff) | |
download | nixos-config-057806b4e983712ae4c36b6ac4c962049324c3cd.tar.gz nixos-config-057806b4e983712ae4c36b6ac4c962049324c3cd.zip |
tests(less): Init
Diffstat (limited to '')
-rw-r--r-- | tests/by-name/le/less/data/test.file | 1001 | ||||
-rw-r--r-- | tests/by-name/le/less/test.desc | 50 | ||||
-rw-r--r-- | tests/by-name/le/less/test.nix | 21 |
3 files changed, 1072 insertions, 0 deletions
diff --git a/tests/by-name/le/less/data/test.file b/tests/by-name/le/less/data/test.file new file mode 100644 index 00000000..9e9f8931 --- /dev/null +++ b/tests/by-name/le/less/data/test.file @@ -0,0 +1,1001 @@ +Line number 0. +Line number 1. +Line number 2. +Line number 3. +Line number 4. +Line number 5. +Line number 6. +Line number 7. +Line number 8. +Line number 9. +Line number 10. +Line number 11. +Line number 12. +Line number 13. +Line number 14. +Line number 15. +Line number 16. +Line number 17. +Line number 18. +Line number 19. +Line number 20. +Line number 21. +Line number 22. +Line number 23. +Line number 24. +Line number 25. +Line number 26. +Line number 27. +Line number 28. +Line number 29. +Line number 30. +Line number 31. +Line number 32. +Line number 33. +Line number 34. +Line number 35. +Line number 36. +Line number 37. +Line number 38. +Line number 39. +Line number 40. +Line number 41. +Line number 42. +Line number 43. +Line number 44. +Line number 45. +Line number 46. +Line number 47. +Line number 48. +Line number 49. +Line number 50. +Line number 51. +Line number 52. +Line number 53. +Line number 54. +Line number 55. +Line number 56. +Line number 57. +Line number 58. +Line number 59. +Line number 60. +Line number 61. +Line number 62. +Line number 63. +Line number 64. +Line number 65. +Line number 66. +Line number 67. +Line number 68. +Line number 69. +Line number 70. +Line number 71. +Line number 72. +Line number 73. +Line number 74. +Line number 75. +Line number 76. +Line number 77. +Line number 78. +Line number 79. +Line number 80. +Line number 81. +Line number 82. +Line number 83. +Line number 84. +Line number 85. +Line number 86. +Line number 87. +Line number 88. +Line number 89. +Line number 90. +Line number 91. +Line number 92. +Line number 93. +Line number 94. +Line number 95. +Line number 96. +Line number 97. +Line number 98. +Line number 99. +Line number 100. +Line number 101. +Line number 102. +Line number 103. +Line number 104. +Line number 105. +Line number 106. +Line number 107. +Line number 108. +Line number 109. +Line number 110. +Line number 111. +Line number 112. +Line number 113. +Line number 114. +Line number 115. +Line number 116. +Line number 117. +Line number 118. +Line number 119. +Line number 120. +Line number 121. +Line number 122. +Line number 123. +Line number 124. +Line number 125. +Line number 126. +Line number 127. +Line number 128. +Line number 129. +Line number 130. +Line number 131. +Line number 132. +Line number 133. +Line number 134. +Line number 135. +Line number 136. +Line number 137. +Line number 138. +Line number 139. +Line number 140. +Line number 141. +Line number 142. +Line number 143. +Line number 144. +Line number 145. +Line number 146. +Line number 147. +Line number 148. +Line number 149. +Line number 150. +Line number 151. +Line number 152. +Line number 153. +Line number 154. +Line number 155. +Line number 156. +Line number 157. +Line number 158. +Line number 159. +Line number 160. +Line number 161. +Line number 162. +Line number 163. +Line number 164. +Line number 165. +Line number 166. +Line number 167. +Line number 168. +Line number 169. +Line number 170. +Line number 171. +Line number 172. +Line number 173. +Line number 174. +Line number 175. +Line number 176. +Line number 177. +Line number 178. +Line number 179. +Line number 180. +Line number 181. +Line number 182. +Line number 183. +Line number 184. +Line number 185. +Line number 186. +Line number 187. +Line number 188. +Line number 189. +Line number 190. +Line number 191. +Line number 192. +Line number 193. +Line number 194. +Line number 195. +Line number 196. +Line number 197. +Line number 198. +Line number 199. +Line number 200. +Line number 201. +Line number 202. +Line number 203. +Line number 204. +Line number 205. +Line number 206. +Line number 207. +Line number 208. +Line number 209. +Line number 210. +Line number 211. +Line number 212. +Line number 213. +Line number 214. +Line number 215. +Line number 216. +Line number 217. +Line number 218. +Line number 219. +Line number 220. +Line number 221. +Line number 222. +Line number 223. +Line number 224. +Line number 225. +Line number 226. +Line number 227. +Line number 228. +Line number 229. +Line number 230. +Line number 231. +Line number 232. +Line number 233. +Line number 234. +Line number 235. +Line number 236. +Line number 237. +Line number 238. +Line number 239. +Line number 240. +Line number 241. +Line number 242. +Line number 243. +Line number 244. +Line number 245. +Line number 246. +Line number 247. +Line number 248. +Line number 249. +Line number 250. +Line number 251. +Line number 252. +Line number 253. +Line number 254. +Line number 255. +Line number 256. +Line number 257. +Line number 258. +Line number 259. +Line number 260. +Line number 261. +Line number 262. +Line number 263. +Line number 264. +Line number 265. +Line number 266. +Line number 267. +Line number 268. +Line number 269. +Line number 270. +Line number 271. +Line number 272. +Line number 273. +Line number 274. +Line number 275. +Line number 276. +Line number 277. +Line number 278. +Line number 279. +Line number 280. +Line number 281. +Line number 282. +Line number 283. +Line number 284. +Line number 285. +Line number 286. +Line number 287. +Line number 288. +Line number 289. +Line number 290. +Line number 291. +Line number 292. +Line number 293. +Line number 294. +Line number 295. +Line number 296. +Line number 297. +Line number 298. +Line number 299. +Line number 300. +Line number 301. +Line number 302. +Line number 303. +Line number 304. +Line number 305. +Line number 306. +Line number 307. +Line number 308. +Line number 309. +Line number 310. +Line number 311. +Line number 312. +Line number 313. +Line number 314. +Line number 315. +Line number 316. +Line number 317. +Line number 318. +Line number 319. +Line number 320. +Line number 321. +Line number 322. +Line number 323. +Line number 324. +Line number 325. +Line number 326. +Line number 327. +Line number 328. +Line number 329. +Line number 330. +Line number 331. +Line number 332. +Line number 333. +Line number 334. +Line number 335. +Line number 336. +Line number 337. +Line number 338. +Line number 339. +Line number 340. +Line number 341. +Line number 342. +Line number 343. +Line number 344. +Line number 345. +Line number 346. +Line number 347. +Line number 348. +Line number 349. +Line number 350. +Line number 351. +Line number 352. +Line number 353. +Line number 354. +Line number 355. +Line number 356. +Line number 357. +Line number 358. +Line number 359. +Line number 360. +Line number 361. +Line number 362. +Line number 363. +Line number 364. +Line number 365. +Line number 366. +Line number 367. +Line number 368. +Line number 369. +Line number 370. +Line number 371. +Line number 372. +Line number 373. +Line number 374. +Line number 375. +Line number 376. +Line number 377. +Line number 378. +Line number 379. +Line number 380. +Line number 381. +Line number 382. +Line number 383. +Line number 384. +Line number 385. +Line number 386. +Line number 387. +Line number 388. +Line number 389. +Line number 390. +Line number 391. +Line number 392. +Line number 393. +Line number 394. +Line number 395. +Line number 396. +Line number 397. +Line number 398. +Line number 399. +Line number 400. +Line number 401. +Line number 402. +Line number 403. +Line number 404. +Line number 405. +Line number 406. +Line number 407. +Line number 408. +Line number 409. +Line number 410. +Line number 411. +Line number 412. +Line number 413. +Line number 414. +Line number 415. +Line number 416. +Line number 417. +Line number 418. +Line number 419. +Line number 420. +Line number 421. +Line number 422. +Line number 423. +Line number 424. +Line number 425. +Line number 426. +Line number 427. +Line number 428. +Line number 429. +Line number 430. +Line number 431. +Line number 432. +Line number 433. +Line number 434. +Line number 435. +Line number 436. +Line number 437. +Line number 438. +Line number 439. +Line number 440. +Line number 441. +Line number 442. +Line number 443. +Line number 444. +Line number 445. +Line number 446. +Line number 447. +Line number 448. +Line number 449. +Line number 450. +Line number 451. +Line number 452. +Line number 453. +Line number 454. +Line number 455. +Line number 456. +Line number 457. +Line number 458. +Line number 459. +Line number 460. +Line number 461. +Line number 462. +Line number 463. +Line number 464. +Line number 465. +Line number 466. +Line number 467. +Line number 468. +Line number 469. +Line number 470. +Line number 471. +Line number 472. +Line number 473. +Line number 474. +Line number 475. +Line number 476. +Line number 477. +Line number 478. +Line number 479. +Line number 480. +Line number 481. +Line number 482. +Line number 483. +Line number 484. +Line number 485. +Line number 486. +Line number 487. +Line number 488. +Line number 489. +Line number 490. +Line number 491. +Line number 492. +Line number 493. +Line number 494. +Line number 495. +Line number 496. +Line number 497. +Line number 498. +Line number 499. +Line number 500. +Line number 501. +Line number 502. +Line number 503. +Line number 504. +Line number 505. +Line number 506. +Line number 507. +Line number 508. +Line number 509. +Line number 510. +Line number 511. +Line number 512. +Line number 513. +Line number 514. +Line number 515. +Line number 516. +Line number 517. +Line number 518. +Line number 519. +Line number 520. +Line number 521. +Line number 522. +Line number 523. +Line number 524. +Line number 525. +Line number 526. +Line number 527. +Line number 528. +Line number 529. +Line number 530. +Line number 531. +Line number 532. +Line number 533. +Line number 534. +Line number 535. +Line number 536. +Line number 537. +Line number 538. +Line number 539. +Line number 540. +Line number 541. +Line number 542. +Line number 543. +Line number 544. +Line number 545. +Line number 546. +Line number 547. +Line number 548. +Line number 549. +Line number 550. +Line number 551. +Line number 552. +Line number 553. +Line number 554. +Line number 555. +Line number 556. +Line number 557. +Line number 558. +Line number 559. +Line number 560. +Line number 561. +Line number 562. +Line number 563. +Line number 564. +Line number 565. +Line number 566. +Line number 567. +Line number 568. +Line number 569. +Line number 570. +Line number 571. +Line number 572. +Line number 573. +Line number 574. +Line number 575. +Line number 576. +Line number 577. +Line number 578. +Line number 579. +Line number 580. +Line number 581. +Line number 582. +Line number 583. +Line number 584. +Line number 585. +Line number 586. +Line number 587. +Line number 588. +Line number 589. +Line number 590. +Line number 591. +Line number 592. +Line number 593. +Line number 594. +Line number 595. +Line number 596. +Line number 597. +Line number 598. +Line number 599. +Line number 600. +Line number 601. +Line number 602. +Line number 603. +Line number 604. +Line number 605. +Line number 606. +Line number 607. +Line number 608. +Line number 609. +Line number 610. +Line number 611. +Line number 612. +Line number 613. +Line number 614. +Line number 615. +Line number 616. +Line number 617. +Line number 618. +Line number 619. +Line number 620. +Line number 621. +Line number 622. +Line number 623. +Line number 624. +Line number 625. +Line number 626. +Line number 627. +Line number 628. +Line number 629. +Line number 630. +Line number 631. +Line number 632. +Line number 633. +Line number 634. +Line number 635. +Line number 636. +Line number 637. +Line number 638. +Line number 639. +Line number 640. +Line number 641. +Line number 642. +Line number 643. +Line number 644. +Line number 645. +Line number 646. +Line number 647. +Line number 648. +Line number 649. +Line number 650. +Line number 651. +Line number 652. +Line number 653. +Line number 654. +Line number 655. +Line number 656. +Line number 657. +Line number 658. +Line number 659. +Line number 660. +Line number 661. +Line number 662. +Line number 663. +Line number 664. +Line number 665. +Line number 666. +Line number 667. +Line number 668. +Line number 669. +Line number 670. +Line number 671. +Line number 672. +Line number 673. +Line number 674. +Line number 675. +Line number 676. +Line number 677. +Line number 678. +Line number 679. +Line number 680. +Line number 681. +Line number 682. +Line number 683. +Line number 684. +Line number 685. +Line number 686. +Line number 687. +Line number 688. +Line number 689. +Line number 690. +Line number 691. +Line number 692. +Line number 693. +Line number 694. +Line number 695. +Line number 696. +Line number 697. +Line number 698. +Line number 699. +Line number 700. +Line number 701. +Line number 702. +Line number 703. +Line number 704. +Line number 705. +Line number 706. +Line number 707. +Line number 708. +Line number 709. +Line number 710. +Line number 711. +Line number 712. +Line number 713. +Line number 714. +Line number 715. +Line number 716. +Line number 717. +Line number 718. +Line number 719. +Line number 720. +Line number 721. +Line number 722. +Line number 723. +Line number 724. +Line number 725. +Line number 726. +Line number 727. +Line number 728. +Line number 729. +Line number 730. +Line number 731. +Line number 732. +Line number 733. +Line number 734. +Line number 735. +Line number 736. +Line number 737. +Line number 738. +Line number 739. +Line number 740. +Line number 741. +Line number 742. +Line number 743. +Line number 744. +Line number 745. +Line number 746. +Line number 747. +Line number 748. +Line number 749. +Line number 750. +Line number 751. +Line number 752. +Line number 753. +Line number 754. +Line number 755. +Line number 756. +Line number 757. +Line number 758. +Line number 759. +Line number 760. +Line number 761. +Line number 762. +Line number 763. +Line number 764. +Line number 765. +Line number 766. +Line number 767. +Line number 768. +Line number 769. +Line number 770. +Line number 771. +Line number 772. +Line number 773. +Line number 774. +Line number 775. +Line number 776. +Line number 777. +Line number 778. +Line number 779. +Line number 780. +Line number 781. +Line number 782. +Line number 783. +Line number 784. +Line number 785. +Line number 786. +Line number 787. +Line number 788. +Line number 789. +Line number 790. +Line number 791. +Line number 792. +Line number 793. +Line number 794. +Line number 795. +Line number 796. +Line number 797. +Line number 798. +Line number 799. +Line number 800. +Line number 801. +Line number 802. +Line number 803. +Line number 804. +Line number 805. +Line number 806. +Line number 807. +Line number 808. +Line number 809. +Line number 810. +Line number 811. +Line number 812. +Line number 813. +Line number 814. +Line number 815. +Line number 816. +Line number 817. +Line number 818. +Line number 819. +Line number 820. +Line number 821. +Line number 822. +Line number 823. +Line number 824. +Line number 825. +Line number 826. +Line number 827. +Line number 828. +Line number 829. +Line number 830. +Line number 831. +Line number 832. +Line number 833. +Line number 834. +Line number 835. +Line number 836. +Line number 837. +Line number 838. +Line number 839. +Line number 840. +Line number 841. +Line number 842. +Line number 843. +Line number 844. +Line number 845. +Line number 846. +Line number 847. +Line number 848. +Line number 849. +Line number 850. +Line number 851. +Line number 852. +Line number 853. +Line number 854. +Line number 855. +Line number 856. +Line number 857. +Line number 858. +Line number 859. +Line number 860. +Line number 861. +Line number 862. +Line number 863. +Line number 864. +Line number 865. +Line number 866. +Line number 867. +Line number 868. +Line number 869. +Line number 870. +Line number 871. +Line number 872. +Line number 873. +Line number 874. +Line number 875. +Line number 876. +Line number 877. +Line number 878. +Line number 879. +Line number 880. +Line number 881. +Line number 882. +Line number 883. +Line number 884. +Line number 885. +Line number 886. +Line number 887. +Line number 888. +Line number 889. +Line number 890. +Line number 891. +Line number 892. +Line number 893. +Line number 894. +Line number 895. +Line number 896. +Line number 897. +Line number 898. +Line number 899. +Line number 900. +Line number 901. +Line number 902. +Line number 903. +Line number 904. +Line number 905. +Line number 906. +Line number 907. +Line number 908. +Line number 909. +Line number 910. +Line number 911. +Line number 912. +Line number 913. +Line number 914. +Line number 915. +Line number 916. +Line number 917. +Line number 918. +Line number 919. +Line number 920. +Line number 921. +Line number 922. +Line number 923. +Line number 924. +Line number 925. +Line number 926. +Line number 927. +Line number 928. +Line number 929. +Line number 930. +Line number 931. +Line number 932. +Line number 933. +Line number 934. +Line number 935. +Line number 936. +Line number 937. +Line number 938. +Line number 939. +Line number 940. +Line number 941. +Line number 942. +Line number 943. +Line number 944. +Line number 945. +Line number 946. +Line number 947. +Line number 948. +Line number 949. +Line number 950. +Line number 951. +Line number 952. +Line number 953. +Line number 954. +Line number 955. +Line number 956. +Line number 957. +Line number 958. +Line number 959. +Line number 960. +Line number 961. +Line number 962. +Line number 963. +Line number 964. +Line number 965. +Line number 966. +Line number 967. +Line number 968. +Line number 969. +Line number 970. +Line number 971. +Line number 972. +Line number 973. +Line number 974. +Line number 975. +Line number 976. +Line number 977. +Line number 978. +Line number 979. +Line number 980. +Line number 981. +Line number 982. +Line number 983. +Line number 984. +Line number 985. +Line number 986. +Line number 987. +Line number 988. +Line number 989. +Line number 990. +Line number 991. +Line number 992. +Line number 993. +Line number 994. +Line number 995. +Line number 996. +Line number 997. +Line number 998. +Line number 999. +Line number 1000. diff --git a/tests/by-name/le/less/test.desc b/tests/by-name/le/less/test.desc new file mode 100644 index 00000000..6cb28b9a --- /dev/null +++ b/tests/by-name/le/less/test.desc @@ -0,0 +1,50 @@ +# This is a specification of what to do in the test script. +# It is inspired by the syntax of vhs tapes. + +# Give everything time to start up +Sleep 2 + +Type less ./data/test.file +Sleep 0.5 +Type Enter +Sleep 1 + +Type G +Sleep 1 +Expect ^Line number 1000.$ + +Type gg +Sleep 1 +Expect ^Line number 1.$ + +Type Space +Sleep 1 +Expect ^Line number 23.$ +ExpectNot ^Line number 22.$ +ExpectNot ^Line number 46.$ + +Type tt +Sleep 1 +ExpectNot ^Line number 23.$ +ExpectNot ^Line number 24.$ +Expect ^Line number 25.$ +Expect ^Line number 47.$ + +Type Gn +Sleep 1 +Expect ^Line number 999.$ +ExpectNot ^Line number 1000.$ + +# Type Up +# Sleep 1 +# ExpectNot ^Line number 976.$ +# Expect ^Line number 999.$ +# +# Type Down +# Sleep 1 +# ExpectNot ^Line number 1000.$ +# Expect ^Line number 977.$ + +Type Escape + +# vim: ft=tape diff --git a/tests/by-name/le/less/test.nix b/tests/by-name/le/less/test.nix new file mode 100644 index 00000000..289a9989 --- /dev/null +++ b/tests/by-name/le/less/test.nix @@ -0,0 +1,21 @@ +{mkTest}: +mkTest { + name = "less"; + + configuration = { + imports = [ + ../../../../modules/by-name/le/less/module.nix + ]; + config.soispha.programs.less.enable = true; + }; + + testData = { + "data/test.file" = ./data/test.file; + }; + + description = ./test.desc; + + # FIXME: Currently the golden file is not reproducible. <2024-11-22> + hash = null; + # hash = "87901231393b51cdd45bbb4339a32db2894a3a5ab164cb5c7a8fa14721fdcba7"; +} |