Stefan Leichter : kernel: Added a test for QueryDosDeviceA.
Alexandre Julliard
julliard at wine.codeweavers.com
Mon Feb 6 05:10:30 CST 2006
Module: wine
Branch: refs/heads/master
Commit: acb52e52723189b3a693344dca108d5d9bbec8c9
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=acb52e52723189b3a693344dca108d5d9bbec8c9
Author: Stefan Leichter <Stefan.Leichter at camLine.com>
Date: Mon Feb 6 11:57:02 2006 +0100
kernel: Added a test for QueryDosDeviceA.
---
dlls/kernel/tests/.gitignore | 1 +
dlls/kernel/tests/Makefile.in | 3 ++
dlls/kernel/tests/volume.c | 51 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 1 deletions(-)
create mode 100644 dlls/kernel/tests/volume.c
diff --git a/dlls/kernel/tests/.gitignore b/dlls/kernel/tests/.gitignore
index e65a852..9546859 100644
--- a/dlls/kernel/tests/.gitignore
+++ b/dlls/kernel/tests/.gitignore
@@ -25,3 +25,4 @@ thread.ok
time.ok
timer.ok
virtual.ok
+volume.ok
diff --git a/dlls/kernel/tests/Makefile.in b/dlls/kernel/tests/Makefile.in
index 6968d3c..9543047 100644
--- a/dlls/kernel/tests/Makefile.in
+++ b/dlls/kernel/tests/Makefile.in
@@ -30,7 +30,8 @@ CTESTS = \
thread.c \
time.c \
timer.c \
- virtual.c
+ virtual.c \
+ volume.c
@MAKE_TEST_RULES@
diff --git a/dlls/kernel/tests/volume.c b/dlls/kernel/tests/volume.c
new file mode 100644
index 0000000..98972dd
--- /dev/null
+++ b/dlls/kernel/tests/volume.c
@@ -0,0 +1,51 @@
+/*
+ * Unit test suite
+ *
+ * Copyright 2006 Stefan Leichter
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#include "wine/test.h"
+#include "winbase.h"
+
+#define CDROM "CDROM"
+#define FLOPPY "FLOPPY"
+#define HARDISK "HARDDISK"
+#define LANMAN "LANMANREDIRECTOR"
+#define RAMDISK "RAMDISK"
+
+static void test_query_dos_deviceA(void)
+{
+ char drivestr[] = "a:";
+ char *p, buffer[2000];
+ DWORD ret;
+ for (;drivestr[0] <= 'z'; drivestr[0]++) {
+ ret = QueryDosDeviceA( drivestr, buffer, sizeof(buffer));
+ if(ret) {
+ for (p = buffer; *p; p++) *p = toupper(*p);
+ todo_wine
+ ok( strstr( buffer, CDROM) || strstr( buffer, FLOPPY) ||
+ strstr( buffer, HARDISK) || strstr( buffer, LANMAN) ||
+ strstr( buffer, RAMDISK), "expect the string %s contains %s,%s,%s,%s or %s\n",
+ buffer, CDROM, FLOPPY, HARDISK, LANMAN, RAMDISK);
+ }
+ }
+}
+
+START_TEST(volume)
+{
+ test_query_dos_deviceA();
+}
More information about the wine-cvs
mailing list