xpcom/tests/TestArguments.cpp
author David Anderson <danderson@mozilla.com>
Wed, 15 Feb 2012 13:45:39 -0800
changeset 112131 98a0b13b8a0cec8430394da7d323021ff8ee7800
parent 29472 28aa23105a9e238ce28fc7bbbdb5fccc27db325b
child 368271 7011bfbad725d998c408ddf89c01db7d9161eb44
permissions -rw-r--r--
Merge from mozilla-central.

#include <string.h>

int main(int argc, char* argv[]) {
  if (argc != 9)
      return -1;

  if (strcmp("mozilla", argv[1]) != 0)
      return 1;
  if (strcmp("firefox", argv[2]) != 0)
      return 2;
  if (strcmp("thunderbird", argv[3]) != 0)
      return 3;
  if (strcmp("seamonkey", argv[4]) != 0)
      return 4;
  if (strcmp("foo", argv[5]) != 0)
      return 5;
  if (strcmp("bar", argv[6]) != 0)
      return 6;
  if (strcmp("argument with spaces", argv[7]) != 0)
      return 7;
  if (strcmp("\"argument with quotes\"", argv[8]) != 0)
      return 8;
  
  return 0;
}