1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
8 * Description: testing the "special" fds
9 * Modification History:
10 * 20-May-1997 AGarcia - Replace Test succeeded status with PASS. This is used by the
11 * regress tool parsing code.
12 ** 04-June-97 AGarcia removed the Test_Result function. Regress tool has been updated to
13 ** recognize the return code from tha main program.
24 static PRIntn PR_CALLBACK
stdio(PRIntn argc
, char **argv
)
28 PRFileDesc
*out
= PR_GetSpecialFD(PR_StandardOutput
);
29 PRFileDesc
*err
= PR_GetSpecialFD(PR_StandardError
);
32 out
, "This to standard out\n",
33 strlen("This to standard out\n"));
34 PR_ASSERT((PRInt32
)strlen("This to standard out\n") == rv
);
36 err
, "This to standard err\n",
37 strlen("This to standard err\n"));
38 PR_ASSERT((PRInt32
)strlen("This to standard err\n") == rv
);
44 int main(int argc
, char **argv
)
47 return PR_Initialize(stdio
, argc
, argv
, 0);