Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ec00d6dc
Commit
ec00d6dc
authored
Nov 29, 2010
by
Alexander Puzankov
Committed by
Alexandre Julliard
Dec 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm/tests: Add tests for mmioOpen for the file name of the form EXAMPLE.EXT+ABC.
parent
507db530
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
0 deletions
+51
-0
mmio.c
dlls/winmm/tests/mmio.c
+51
-0
No files found.
dlls/winmm/tests/mmio.c
View file @
ec00d6dc
...
@@ -619,6 +619,56 @@ static void test_mmioSetBuffer(char *fname)
...
@@ -619,6 +619,56 @@ static void test_mmioSetBuffer(char *fname)
mmioClose
(
hmmio
,
0
);
mmioClose
(
hmmio
,
0
);
}
}
#define FOURCC_XYZ mmioFOURCC('X', 'Y', 'Z', ' ')
static
LRESULT
CALLBACK
mmio_test_IOProc
(
LPSTR
lpMMIOInfo
,
UINT
uMessage
,
LPARAM
lParam1
,
LPARAM
lParam2
)
{
LPMMIOINFO
lpInfo
=
(
LPMMIOINFO
)
lpMMIOInfo
;
switch
(
uMessage
)
{
case
MMIOM_OPEN
:
if
(
lpInfo
->
fccIOProc
==
FOURCC_DOS
)
lpInfo
->
fccIOProc
=
mmioFOURCC
(
'F'
,
'A'
,
'I'
,
'L'
);
return
MMSYSERR_NOERROR
;
case
MMIOM_CLOSE
:
return
MMSYSERR_NOERROR
;
default:
return
0
;
}
}
static
void
test_mmioOpen_fourcc
(
void
)
{
char
fname
[]
=
"file+name.xyz+one.two"
;
LPMMIOPROC
lpProc
;
HMMIO
hmmio
;
MMIOINFO
mmio
;
lpProc
=
mmioInstallIOProc
(
FOURCC_DOS
,
mmio_test_IOProc
,
MMIO_INSTALLPROC
);
ok
(
lpProc
==
mmio_test_IOProc
,
"mmioInstallIOProc error
\n
"
);
lpProc
=
mmioInstallIOProc
(
FOURCC_XYZ
,
mmio_test_IOProc
,
MMIO_INSTALLPROC
);
ok
(
lpProc
==
mmio_test_IOProc
,
"mmioInstallIOProc error
\n
"
);
memset
(
&
mmio
,
0
,
sizeof
(
mmio
));
hmmio
=
mmioOpen
(
fname
,
&
mmio
,
MMIO_READ
);
mmioGetInfo
(
hmmio
,
&
mmio
,
0
);
ok
(
hmmio
!=
NULL
&&
mmio
.
fccIOProc
==
FOURCC_XYZ
,
"mmioOpen error %u, got %4.4s
\n
"
,
mmio
.
wErrorRet
,
(
LPCSTR
)
&
mmio
.
fccIOProc
);
mmioClose
(
hmmio
,
0
);
mmioInstallIOProc
(
FOURCC_XYZ
,
NULL
,
MMIO_REMOVEPROC
);
memset
(
&
mmio
,
0
,
sizeof
(
mmio
));
hmmio
=
mmioOpen
(
fname
,
&
mmio
,
MMIO_READ
);
mmioGetInfo
(
hmmio
,
&
mmio
,
0
);
ok
(
hmmio
==
NULL
&&
mmio
.
wErrorRet
==
MMIOERR_FILENOTFOUND
,
"mmioOpen error %u, got %4.4s
\n
"
,
mmio
.
wErrorRet
,
(
LPCSTR
)
&
mmio
.
fccIOProc
);
mmioClose
(
hmmio
,
0
);
mmioInstallIOProc
(
FOURCC_DOS
,
NULL
,
MMIO_REMOVEPROC
);
}
START_TEST
(
mmio
)
START_TEST
(
mmio
)
{
{
char
fname
[]
=
"msrle.avi"
;
char
fname
[]
=
"msrle.avi"
;
...
@@ -629,4 +679,5 @@ START_TEST(mmio)
...
@@ -629,4 +679,5 @@ START_TEST(mmio)
test_mmioOpen
(
fname
);
test_mmioOpen
(
fname
);
test_mmioSetBuffer
(
NULL
);
test_mmioSetBuffer
(
NULL
);
test_mmioSetBuffer
(
fname
);
test_mmioSetBuffer
(
fname
);
test_mmioOpen_fourcc
();
}
}
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