xpcom/tests/TestArguments.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/tests/TestArguments.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,25 @@
     1.4 +#include <string.h>
     1.5 +
     1.6 +int main(int argc, char* argv[]) {
     1.7 +  if (argc != 9)
     1.8 +      return -1;
     1.9 +
    1.10 +  if (strcmp("mozilla", argv[1]) != 0)
    1.11 +      return 1;
    1.12 +  if (strcmp("firefox", argv[2]) != 0)
    1.13 +      return 2;
    1.14 +  if (strcmp("thunderbird", argv[3]) != 0)
    1.15 +      return 3;
    1.16 +  if (strcmp("seamonkey", argv[4]) != 0)
    1.17 +      return 4;
    1.18 +  if (strcmp("foo", argv[5]) != 0)
    1.19 +      return 5;
    1.20 +  if (strcmp("bar", argv[6]) != 0)
    1.21 +      return 6;
    1.22 +  if (strcmp("argument with spaces", argv[7]) != 0)
    1.23 +      return 7;
    1.24 +  if (strcmp("\"argument with quotes\"", argv[8]) != 0)
    1.25 +      return 8;
    1.26 +  
    1.27 +  return 0;
    1.28 +} 

mercurial