sunwait

Commits at d739c26dbdd5ffee96e7e76a3cdb88b23bb2ed00

  1. d739c26d Bash completion Fucking hell. Why would one use this fucking shell? Shota FUJI authored at Shota FUJI comitted at
  2. 55befe09 Fish completion Shota FUJI authored at Shota FUJI comitted at
  3. c9ba5143 Zsh completion Shota FUJI authored at Shota FUJI comitted at
  4. 0f4555c1 Replace CR+LF with LF in snapshot testing Every snapshot tests were errored due to line ending differences. Now, failing tests spot actual differences. Shota FUJI authored at Shota FUJI comitted at
  5. e78ad9d6 Fix build failure on Windows Many tests failing due to CRLF, and one test failing for some unknown reason (Day and Night difference, probably due to datetime things.) But it compiles and runs...honestly I'm not gonna spend much time on Windows. I'm not willing to configure Git, clone a repository, setup toolchains, compile this project, then test things working on that insecure bloated slow garbage. I'll fix CRLF thingy and address bugs if there are assistances, though. Shota FUJI authored at Shota FUJI comitted at
  6. 118ab8ad Simple tests for CLI args parsing Shota FUJI authored at Shota FUJI comitted at
  7. dbc36d1e Use custom iterator for CLI args `std.process.ArgIterator` directly reads from process, so it's impossible to test args parsing using it. Shota FUJI authored at Shota FUJI comitted at
  8. 89744f6b Add tzdata as depedency of the Nix package Nix + libc has fundamental design flaw on TZ loading: <https://github.com./NixOS/nixpkgs/issues/65415> Glibc looks "<its own store>/share/zoneinfo" on TZ lookup, and as it itself does not contain timezone data, every timezone functionality will be broken by treating every timezone as UTC. This won't be a problem on NixOS as it sets $TZDIR environment variable. However, non-NixOS system without $TZDIR faces this problem. For this reason, every program uses libc datetime function must declare tzdata dependency. Shota FUJI authored at Shota FUJI comitted at
  9. b3335f9f Add temporary "--now" option for "report" command This is for snapshotting. Shota FUJI authored at Shota FUJI comitted at
  10. 7f990b65 Add "--at" option to "poll" command For testing. Shota FUJI authored at Shota FUJI comitted at
  11. 72e50fd3 Fix timeout calculation applied in inverted way That fucking variable negates timezone offset for some unknown reason (probably American programming this time too.) Shota FUJI authored at Shota FUJI comitted at
  12. 200c24e2 Fix test changes its snapshot day to day Due to lack of "--from", test result differs depends on the date test ran. Shota FUJI authored at Shota FUJI comitted at
  13. c60756e3 Remove snapshot test for "version" command It was there as a demo. Shota FUJI authored at Shota FUJI comitted at
  14. f690ac25 Add "--from" option to "list" command It was nearly impossible to test due to reference to the system time. Shota FUJI authored at Shota FUJI comitted at
  15. 08f471e4 Setup snapshot testings Behavior matching tests is helpful, but it prevents me from adding, changing or improving existing functionality. Snapshot testing solves this problem. Here is my plan: 1. Add a way to fix time (new CLI arg or C API something) 2. Create snapshots for behavior matching tests 3. Delete behavior matching tests This file-based snapshotting works great with external tools. In a future when I add a structured output (e.g. JSON,) difftastic would help diff-ing a lot. The reason I choose "version" command is it does not rely on system time. Even "report" command prints current time to output and that messes snapshot testing up. Shota FUJI authored at Shota FUJI comitted at
  16. 6c53f057 Add E2E test for incorrect CLI usage Shota FUJI authored at Shota FUJI comitted at
  17. 4cc8a62f E2E testing As I'm going to add features and changes to existing behavior, tests not bound to legacy program is necessary. Shota FUJI authored at Shota FUJI comitted at
  18. 7d352678 Add --date option to report command It supersedes "y", "m" and "d" options. I'm yet to decide it should be positional or labelled, so CLI currently accepts both. Shota FUJI authored at Shota FUJI comitted at
  19. 18912188 Separate arg parser code into several files It was not easy to read, and I'm going to add more logic to arg parsers. Shota FUJI authored at Shota FUJI comitted at
  20. f20b6a42 Fix grammar on help message Shota FUJI authored at Shota FUJI comitted at
  21. 8f2024a8 Update man pages to the new CLI Previous CLI don't fit well to man page format, especially due to its hyphen-less semi-positional sometimes-ignored options. Shota FUJI authored at Shota FUJI comitted at
  22. 237048ce Document how to build man page Shota FUJI authored at Shota FUJI comitted at
  23. 5b18e92e Defaults to the new Zig CLI Every functionality I'm aware of has been migrated. Shota FUJI authored at Shota FUJI comitted at
  24. b1606ed6 Add examples in original USAGE.txt as behavior tests Final check. Shota FUJI authored at Shota FUJI comitted at
  25. 37828fd1 Wait command No behavior tests for this. How should I do CLI program that performs `sleep()`? Shota FUJI authored at Shota FUJI comitted at
  26. fea537ab Offset CLI argument Shota FUJI authored at Shota FUJI comitted at
  27. bdb74658 Fix incorrect offset usage in man page Shota FUJI authored at Shota FUJI comitted at
  28. 024f9127 Fix prints "unknown argument" for incorrect arguments Errors other than UnknownArg, such as MissingValue logs eariler. UnknownArg is also used as a "skip" signal and there were no other error in an error set, that's why the log was here. I simply forgot to remove that when I added other error values. Shota FUJI authored at Shota FUJI comitted at
  29. 30ddee1c Twilight angle CLI argument Shota FUJI authored at Shota FUJI comitted at
  30. 64f0da64 Event type arguments for list command I initially thought these args affects every command. Turned out, only "list" and "wait" commands use those args. That's why I set those as command options rather than global options. This time, I choose correctness and user-friendliness over backwards-compatibility. Shota FUJI authored at Shota FUJI comitted at