~ubuntu-branches/ubuntu/raring/virtualbox-ose/raring

« back to all changes in this revision

Viewing changes to src/VBox/Runtime/testcase/tstDir-3.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-01-30 23:27:25 UTC
  • mfrom: (0.3.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20110130232725-2ouajjd2ggdet0zd
Tags: 4.0.2-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Drop ubuntu-01-fix-build-gcc45.patch, fixed upstream.
* Drop ubuntu-02-as-needed.patch, added to the Debian package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $Id: tstDir-3.cpp $ */
 
1
/* $Id: tstDir-3.cpp 33464 2010-10-26 12:27:50Z vboxsync $ */
2
2
/** @file
3
3
 * IPRT Testcase - Directory listing & filtering (no parameters needed).
4
4
 */
83
83
 
84
84
    const char *pszTestDir = ".";
85
85
 
86
 
    char *pszFilter1 = NULL;
87
 
    rc = RTStrAPrintf(&pszFilter1, "%s%c%s", pszTestDir, RTPATH_SLASH, "xyxzxq*");
88
 
    if (RT_FAILURE(rc))
 
86
    char *pszFilter1 = RTPathJoinA(pszTestDir, "xyxzxq*");
 
87
    if (!pszFilter1)
89
88
    {
90
 
        RTPrintf("tstDir-3: cannot create non-match filter! rc=%Rrc\n", rc);
 
89
        RTPrintf("tstDir-3: cannot create non-match filter!\n");
91
90
        return 1;
92
91
    }
93
92
 
94
 
    char *pszFilter2 = NULL;
95
 
    rc = RTStrAPrintf(&pszFilter2, "%s%c%s", pszTestDir, RTPATH_SLASH, "*");
96
 
    if (RT_FAILURE(rc))
 
93
    char *pszFilter2 = RTPathJoinA(pszTestDir, "*");
 
94
    if (!pszFilter2)
97
95
    {
98
 
        RTPrintf("tstDir-3: cannot create match filter! rc=%Rrc\n", rc);
 
96
        RTPrintf("tstDir-3: cannot create match filter!\n");
99
97
        return 1;
100
98
    }
101
99