// vim: syntax=cpp /* * Copyright (C) 2007-2023 Xagasoft, All rights reserved. * * This file is part of the libbu++ library and is released under the * terms of the license contained in the file LICENSE. */ #include "bu/strfilter.h" #include "bu/base64.h" suite MemBuf { test decode01 { unitTest( Bu::decodeStr("RnVu") == "Fun" ); unitTest( Bu::decodeStr("V2hhdA==") == "What" ); unitTest( Bu::decodeStr("SGVsbG8=") == "Hello" ); } test encode01 { unitTest( Bu::decodeStr("R n V u") == "Fun" ); unitTest( Bu::decodeStr("V2\n\n\thh dA==") == "What" ); unitTest( Bu::decodeStr("\n\n\t\t SGV\r\ns\tbG8\n=") == "Hello" ); } }