File: base64.c

package info (click to toggle)
gcli 2.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,596 kB
  • sloc: ansic: 26,273; sh: 601; makefile: 538; perl: 374; yacc: 261; lex: 59
file content (18 lines) | stat: -rw-r--r-- 330 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <gcli/base64.h>

#include "unit.h"

DEFINE_TESTCASE(simple_decode)
{
	char const input[] = "aGVsbG8gd29ybGQ=";
	char output[sizeof("hello world")] = {0};

	int rc = gcli_decode_base64(NULL, input, output, sizeof(output));
	REQUIRE(rc == 0);
	CHECK_STREQ(output, "hello world");
}

TESTSUITE
{
	TESTCASE(simple_decode);
}