Changeset 3bacee1 in mainline for uspace/app/bdsh
- Timestamp:
- 2018-04-12T16:27:17Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3cf22f9
- Parents:
- 76d0981d
- git-author:
- Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
- Location:
- uspace/app/bdsh
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cmp/cmp.c
r76d0981d r3bacee1 59 59 help_cmd_cmp(HELP_SHORT); 60 60 printf( 61 "Usage: %s [options] <file1> <file2>\n"62 "Options:\n"63 " -h, --help A short option summary\n"64 " -v, --version Print version information and exit\n"65 "No output is printed; the return code is 1 if the files differ.\n",66 cmdname);61 "Usage: %s [options] <file1> <file2>\n" 62 "Options:\n" 63 " -h, --help A short option summary\n" 64 " -v, --version Print version information and exit\n" 65 "No output is printed; the return code is 1 if the files differ.\n", 66 cmdname); 67 67 } 68 68 … … 73 73 { 74 74 errno_t rc = EOK; 75 const char *fn[2] = { fn0, fn1};76 int fd[2] = { -1, -1};75 const char *fn[2] = { fn0, fn1 }; 76 int fd[2] = { -1, -1 }; 77 77 char buffer[2][CMP_BUFLEN]; 78 78 size_t offset[2]; 79 aoff64_t pos[2] = { };79 aoff64_t pos[2] = { }; 80 80 81 81 for (int i = 0; i < 2; i++) { … … 142 142 if (argc - optind != 2) { 143 143 printf("%s - incorrect number of arguments. Try `%s --help'\n", 144 144 cmdname, cmdname); 145 145 return CMD_FAILURE; 146 146 } -
uspace/app/bdsh/test/toktest.c
r76d0981d r3bacee1 43 43 44 44 /* Tokenize the input, asserts that number of tokens is okay. */ 45 static void prepare(const char *input, size_t expected_token_count) { 45 static void prepare(const char *input, size_t expected_token_count) 46 { 46 47 str_cpy(input_buffer, MAX_INPUT, input); 47 48 … … 68 69 PCUT_TEST_SUITE(tokenizer); 69 70 70 PCUT_TEST_AFTER { 71 PCUT_TEST_AFTER 72 { 71 73 /* Destroy the tokenizer. */ 72 74 tok_fini(&tokenizer); … … 74 76 75 77 76 PCUT_TEST(empty_input) { 78 PCUT_TEST(empty_input) 79 { 77 80 prepare("", 0); 78 81 } 79 82 80 PCUT_TEST(only_spaces) { 83 PCUT_TEST(only_spaces) 84 { 81 85 prepare(" ", 1); 82 86 … … 84 88 } 85 89 86 PCUT_TEST(two_text_tokens) { 90 PCUT_TEST(two_text_tokens) 91 { 87 92 prepare("alpha bravo", 3); 88 93
Note:
See TracChangeset
for help on using the changeset viewer.