External: enhanced arguments. Internal: cleanup + find difftool#1
External: enhanced arguments. Internal: cleanup + find difftool#1MichaelRWolf wants to merge 19 commits intoapprovals:mainfrom
Conversation
Reviewer's Guide by SourceryThis pull request enhances the test scripts by adding a new test case, improving script robustness, and adding debugging capabilities. The changes include the addition of a new test case in Sequence diagram for verify.sh test executionsequenceDiagram
participant Script as verify.sh
participant Git as Git Config
participant Files as File System
participant DiffTool as Diff Tool
Script->>Git: Check git diff.tool config
Git-->>Script: Return configured tool
Script->>Files: Create/update received file
Script->>Files: Check approved file
alt Files match
Script->>Files: Remove received file
Script->>+Script: Display pass message
else Files differ
Script->>DiffTool: Show differences
DiffTool-->>Script: Display diff view
Script->>+Script: Display fail message
end
Class diagram for verify.sh functionsclassDiagram
class VerifyScript {
+warn(message)
+debug_arguments()
+main()
+pass(test_name)
+fail(test_name)
+fail_and_diff(test_name)
+pass_and_rm_received(test_name)
+compare_and_approve(test_name)
}
note for VerifyScript "New modular function structure"
class Configuration {
+difftool
+test_name
+received_text
+debug_mode
}
VerifyScript --> Configuration: uses
Flow diagram of enhanced verify.sh scriptflowchart TD
Start([Start]) --> Init[Initialize difftool]
Init --> ParseArgs[Parse command line arguments]
ParseArgs --> CheckName{Test name
specified?}
CheckName -->|No| SetDefault[Set default test name]
CheckName -->|Yes| ProcessInput
SetDefault --> ProcessInput[Process input text]
ProcessInput --> Debug{Debug mode?}
Debug -->|Yes| ShowDebug[Show debug info]
Debug -->|No| Compare[Compare files]
Compare --> Match{Files match?}
Match -->|Yes| Pass[Pass test & remove received]
Match -->|No| Fail[Fail test & show diff]
ShowDebug --> End([End])
Pass --> End
Fail --> End
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@MichaelRWolf Thanks for your 2 year old contribution :) |
|
Happy to walk through it some time. Would Thursday work? If so, send an invitaiton to MichaelRWolf@att.net. I do see the CI broken pipe. It would be good pair on either fixing this or creating a better test. Thanks for reminding me (on Monday) about ApprovalTests.shell. I had forgotten about it, and to see how much better at git PR's I am now versus 2 years ago (i.e. creating a fork then creating a PR versus dead-end changes in my own local repo). ;-) It even felt like a great opportunity to try it out as we slice/peel Diana's fork of Byron's AoB code. Nice synergy. |
This changed the logic. Not sure if it broke something.

Summary for Pull Request
This update introduces enhancements and improvements to the Bash test scripts:
New Test Case:
test.shthat verifies input without a name using themelddiff tool.unspecified_test_name.approved.Enhancements to
verify.sh:set -euo pipefailfor improved script robustness.code --diff).warn()for error messaging.debug_arguments()for debugging script arguments.pass(),fail(),fail_and_diff(), andcompare_and_approve()for improved test processing.-Dflag to allow debugging without running the full comparison and approval process.unspecified_test_name.These changes enhance script flexibility, error handling, and debugging capabilities while maintaining backward compatibility.
Summary by Sourcery
Tests: