-
-
Notifications
You must be signed in to change notification settings - Fork 335
Prompt feature leftover items #804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
ed9ef6e
fix: Correctly resolve path in open and cd prompt actions
lazysegtree ac7914a
Merge pull request #802 from yorukot/prompt_improvements
lazysegtree c74daf4
feat: Add unit test for model action, put firstUse inside model struc…
lazysegtree 49fa9c9
feat: Add prompt tests, Add additional utility functions for test
lazysegtree 3e857c2
Merge pull request #803 from yorukot/model_unit_tests
lazysegtree 4d185dd
feat: Dynamic dimensionf for prompt model, prompt and width adjustmen…
lazysegtree 29c2b3e
fix: Unit test fix for windows
lazysegtree e4676c7
Merge pull request #805 from yorukot/prompt_improvements
lazysegtree ec16805
fix: PR comments, typos, test case fix, prompt min dimensions, etc
lazysegtree fb7c8f9
feat: Render unit tests for prompt model
lazysegtree da01d2e
Merge pull request #809 from yorukot/prompt_unit_tests
lazysegtree 639fa69
fix: PR comments, better error handling in loading config
lazysegtree ba8aa8b
feat: Add --chooser-file and path-list --lastdir-file option
lazysegtree a2daebb
feat: Unit tests for modal quit and chooser file
lazysegtree 8e296fe
feat: Add testsuite test for chooser file
lazysegtree 5c7a12d
fix: PR fix - typos, error handling, other improvements
lazysegtree 1b565ba
Merge pull request #812 from yorukot/chooser_file_options
lazysegtree 8c98741
fix: PR fix - typos, error handling, etc
lazysegtree File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
package utils | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/adrg/xdg" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestResolveAbsPath(t *testing.T) { | ||
testdata := []struct { | ||
name string | ||
cwd string | ||
path string | ||
expectedRes string | ||
}{ | ||
{ | ||
name: "Path cleaup Test 1", | ||
cwd: "/", | ||
path: "////", | ||
expectedRes: "/", | ||
}, | ||
{ | ||
name: "Basic test", | ||
cwd: "/abc", | ||
path: "def", | ||
expectedRes: "/abc/def", | ||
}, | ||
{ | ||
name: "Ignore cwd for abs path", | ||
cwd: "/abc", | ||
path: "/def", | ||
expectedRes: "/def", | ||
}, | ||
{ | ||
name: "Path cleanup Test 2", | ||
cwd: "///abc", | ||
path: "./././def", | ||
expectedRes: "/abc/def", | ||
}, | ||
{ | ||
name: "Basic test with ~", | ||
cwd: "/", | ||
path: "~", | ||
expectedRes: xdg.Home, | ||
}, | ||
{ | ||
name: "~ should not be resolved if not first", | ||
cwd: "abc", | ||
path: "x/~", | ||
expectedRes: "abc/x/~", | ||
}, | ||
} | ||
|
||
for _, tt := range testdata { | ||
t.Run(tt.name, func(t *testing.T) { | ||
assert.Equal(t, tt.expectedRes, ResolveAbsPath(tt.cwd, tt.path)) | ||
}) | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.