fix: now compiles and works for simple commands + clang format
This commit is contained in:
parent
6099bbb9e3
commit
352c122549
23 changed files with 168 additions and 150 deletions
|
|
@ -5,8 +5,8 @@
|
|||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "lexer/lexer.h"
|
||||
#include "io_backend/io_backend.h"
|
||||
#include "lexer/lexer.h"
|
||||
|
||||
TestSuite(peek_token);
|
||||
|
||||
|
|
@ -14,11 +14,7 @@ Test(peek_token, basic_empty)
|
|||
{
|
||||
// simulates input
|
||||
char command[] = "";
|
||||
struct iob_context context =
|
||||
{
|
||||
IOB_MODE_CMD,
|
||||
command
|
||||
};
|
||||
struct iob_context context = { IOB_MODE_CMD, command };
|
||||
iob_init(&context);
|
||||
|
||||
// test
|
||||
|
|
@ -38,11 +34,7 @@ Test(peek_token, basic_word)
|
|||
{
|
||||
// simulates input
|
||||
char command[] = "hello";
|
||||
struct iob_context context =
|
||||
{
|
||||
IOB_MODE_CMD,
|
||||
command
|
||||
};
|
||||
struct iob_context context = { IOB_MODE_CMD, command };
|
||||
iob_init(&context);
|
||||
|
||||
// test
|
||||
|
|
@ -60,11 +52,7 @@ Test(peek_token, basic_words)
|
|||
{
|
||||
// simulates input
|
||||
char command[] = "echo hello there";
|
||||
struct iob_context context =
|
||||
{
|
||||
IOB_MODE_CMD,
|
||||
command
|
||||
};
|
||||
struct iob_context context = { IOB_MODE_CMD, command };
|
||||
iob_init(&context);
|
||||
|
||||
// ======= echo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue