smb: add a unit test for smburl
ClosedPublic

Authored by sitter on Mar 3 2020, 10:31 AM.

Details

Summary

only tests some of the obvious scenarios I can see right now.

::cd() has been changed to only support going up one path element. it's
all we need it for and the previous code was almost certainly incorrect
by calling setUrl with input that is definitely not anywhere near a valid
url

Test Plan

builds and test passes

Diff Detail

Repository
R320 KIO Extras
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Mar 3 2020, 10:31 AM
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptMar 3 2020, 10:31 AM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript
sitter requested review of this revision.Mar 3 2020, 10:31 AM
apol added a subscriber: apol.Mar 3 2020, 2:41 PM
apol added inline comments.
smb/smburl.cpp
67

Can't we then just rename the method to ::cdUp()?

sitter updated this revision to Diff 76861.Mar 3 2020, 3:59 PM

follow Aleix' suggestion and change cd() to cdUp() seeing as it now only cds up

apol added a comment.Mar 3 2020, 7:51 PM

+1 from me

smb/smburl.cpp
67

it can return void too, nobody is checking it anyway.

sitter updated this revision to Diff 76935.Mar 4 2020, 1:41 PM

make cdup void

ngraham accepted this revision.Mar 4 2020, 6:52 PM
This revision is now accepted and ready to land.Mar 4 2020, 6:52 PM
This revision was automatically updated to reflect the committed changes.