Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
e30574e0
Commit
e30574e0
authored
Oct 19, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(app): add a test on `snakeToCamel`
parent
69897ef3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
pre-commit
tests/tools/private/pre-commit
+25
-1
utils.spec.qml
tests/ui/scripts/Utils/utils.spec.qml
+23
-0
No files found.
tests/tools/private/pre-commit
View file @
e30574e0
#!/usr/bin/sh
RED
=
'\e[1;31m'
GREEN
=
'\e[1;32m'
BLUE
=
'\e[1;34m'
NC
=
'\e[0m'
# Check QML files, quit on failure.
sh
"./tests/tools/check_qml"
exit
$?
if
[[
$?
!=
0
]]
;
then
exit
1
fi
# Check JS lib.
printf
"
${
BLUE
}
Testing scripts lib...
${
NC
}
\n
"
so_far_so_good
=
0
qmltestrunner
-input
"./tests/ui/scripts/Utils/utils.spec.qml"
if
[[
$?
==
0
]]
;
then
printf
"
${
GREEN
}
Done. No error found in scripts lib.
\n
"
else
printf
"
${
RED
}
One or more errors were found. Please to fix them.
\n
"
so_far_so_good
=
1
fi
printf
"
${
NC
}
"
exit
$so_far_so_good
tests/ui/scripts/Utils/utils.spec.qml
0 → 100644
View file @
e30574e0
import
QtQuick
2.7
import
QtTest
1.1
// Explicit import, `utils.js` is not accessible in resources file
// when tests are executed.
import
'
./utils.js
'
as
Utils
TestCase
{
name
:
'
UtilsTests
'
function
test_snakeToCamel_data
()
{
return
[
{
input
:
'
foo_bar
'
,
output
:
'
fooBar
'
},
{
input
:
'
george_abitbol
'
,
output
:
'
georgeAbitbol
'
},
{
input
:
'
billTremendousAndHubert
'
,
output
:
'
billTremendousAndHubert
'
},
{
input
:
'
foo_bAr_BAZ
'
,
output
:
'
fooBArBAZ
'
},
]
}
function
test_snakeToCamel
(
data
)
{
compare
(
Utils
.
snakeToCamel
(
data
.
input
),
data
.
output
)
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment