MCPcopy Create free account
hub / github.com/coreutils/coreutils / usage

Function usage

src/test.c:660–825  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

658#if defined TEST_STANDALONE
659
660void
661usage (int status)
662{
663 if (status != EXIT_SUCCESS)
664 emit_try_help ();
665 else
666 {
667 fputs (_("\
668Usage: test EXPRESSION\n\
669 or: test\n\
670 or: [ EXPRESSION ]\n\
671 or: [ ]\n\
672 or: [ OPTION\n\
673"), stdout);
674 fputs (_("\
675Exit with the status determined by EXPRESSION.\n\
676\n\
677"), stdout);
678 oputs (HELP_OPTION_DESCRIPTION);
679 oputs (VERSION_OPTION_DESCRIPTION);
680 fputs (_("\
681\n\
682An omitted EXPRESSION defaults to false. Otherwise,\n\
683EXPRESSION is true or false and sets exit status. It is one of:\n\
684"), stdout);
685 fputs (_("\
686\n\
687 ( EXPRESSION ) EXPRESSION is true\n\
688 ! EXPRESSION EXPRESSION is false\n\
689 EXPRESSION1 -a EXPRESSION2 both EXPRESSION1 and EXPRESSION2 are true\n\
690 EXPRESSION1 -o EXPRESSION2 either EXPRESSION1 or EXPRESSION2 is true\n\
691"), stdout);
692 fputs (_("\
693\n\
694"), stdout);
695 oputs (_("\
696 -n STRING the length of STRING is nonzero\n\
697"));
698 fputs (_("\
699 STRING equivalent to -n STRING\n\
700"), stdout);
701 oputs (_("\
702 -z STRING the length of STRING is zero\n\
703"));
704 fputs (_("\
705 STRING1 = STRING2 the strings are equal\n\
706 STRING1 != STRING2 the strings are not equal\n\
707 STRING1 > STRING2 STRING1 is greater than STRING2 in the current locale\n\
708 STRING1 < STRING2 STRING1 is less than STRING2 in the current locale\n\
709"), stdout);
710 fputs (_("\
711\n\
712"), stdout);
713 oputs (_("\
714 INTEGER1 -eq INTEGER2 INTEGER1 is equal to INTEGER2\n\
715"));
716 oputs (_("\
717 INTEGER1 -ge INTEGER2 INTEGER1 is greater than or equal to INTEGER2\n\

Callers 1

mainFunction · 0.70

Calls 1

emit_ancillary_infoFunction · 0.85

Tested by

no test coverage detected