Repository navigation
Commit 234fa8f
test(exec): add tilde-expansion edge-case tests for ExecApprovalsStore (#750)
Add two tests that cover previously-untested branches of ExpandHomePrefix:
1. ResolveAsync_TildeOnlyStateDir_ResolvesToEffectiveHome
- stateDirOverride == "~" (tilde alone, no trailing separator) must
resolve to the effectiveHome directory. This exercises the
`path == "~"` branch of ExpandHomePrefix that is distinct from the
`path.StartsWith("~/")` branch covered by existing tests.
2. ResolveAsync_TildePrefixedOpenClawHome_ExpandsRelativeToOsHome
- openClawHomeOverride == "~/subdir" is itself tilde-prefixed and must
be expanded relative to osHomeOverride before it is used as the base
for further tilde expansion in stateDirOverride.
Both tests also verify that file migration from the legacy data path to
the resolved state path succeeds and that the migrated file content is
preserved.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>1 parent 429be9b commit 234fa8f
1 file changed
Lines changed: 57 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
829 | 886 | | |
830 | 887 | | |
831 | 888 | | |
| |||
0 commit comments