Repository: conan-io/conan-center-index

Issue:
[request] lest/1.35.1
### Package Details
  * Package Name/Version: **lest/1.35.1**
  * Website: **https://github.com/martinmoene/lest**
  * Source code: **https://github.com/martinmoene/lest**
  * Conan recipe: **https://github.com/martinmoene/lest-conan-package**


### Description Of The Library / Tool
A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD, and BDD (includes C++98 variant) 



Discussion:

Resolving patch:
diff --git a/recipes/lest/all/conanfile.py b/recipes/lest/all/conanfile.py
new file mode 100644
--- /dev/null
+++ b/recipes/lest/all/conanfile.py
@@ -0,0 +1,27 @@
+import os
+
+from conans import ConanFile, tools
+
+class LestConan(ConanFile):
+    name = "lest"
+    description = "A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD."
+    license = "BSL-1.0"
+    topics = ("conan", "testing", "testing-framework", "unit-testing", "header-only")
+    homepage = "https://github.com/martinmoene/lest"
+    url = "https://github.com/conan-io/conan-center-index"
+    no_copy_source = True
+
+    @property
+    def _source_subfolder(self):
+        return "source_subfolder"
+
+    def source(self):
+        tools.get(**self.conan_data["sources"][self.version])
+        os.rename(self.name + "-" + self.version, self._source_subfolder)
+
+    def package(self):
+        self.copy("LICENSE.txt", dst="licenses", src=self._source_subfolder)
+        self.copy(pattern="*.hpp", dst="include", src=os.path.join(self._source_subfolder, "include"))
+
+    def package_id(self):
+        self.info.header_only()


Test patch:
diff --git a/recipes/lest/all/test_package/CMakeLists.txt b/recipes/lest/all/test_package/CMakeLists.txt
new file mode 100644
--- /dev/null
+++ b/recipes/lest/all/test_package/CMakeLists.txt
@@ -0,0 +1,9 @@
+cmake_minimum_required(VERSION 3.1)
+project(test_package)
+
+include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
+conan_basic_setup()
+
+add_executable(${PROJECT_NAME} test_package.cpp)
+target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS})
+set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
diff --git a/recipes/lest/all/test_package/conanfile.py b/recipes/lest/all/test_package/conanfile.py
new file mode 100644
--- /dev/null
+++ b/recipes/lest/all/test_package/conanfile.py
@@ -0,0 +1,17 @@
+import os
+
+from conans import ConanFile, CMake, tools
+
+class TestPackageConan(ConanFile):
+    settings = "os", "compiler", "build_type", "arch"
+    generators = "cmake"
+
+    def build(self):
+        cmake = CMake(self)
+        cmake.configure()
+        cmake.build()
+
+    def test(self):
+        if not tools.cross_building(self.settings):
+            bin_path = os.path.join("bin", "test_package")
+            self.run(bin_path, run_environment=True)
diff --git a/recipes/lest/all/test_package/test_package.cpp b/recipes/lest/all/test_package/test_package.cpp
new file mode 100644
--- /dev/null
+++ b/recipes/lest/all/test_package/test_package.cpp
@@ -0,0 +1,17 @@
+#include "lest/lest.hpp"
+
+
+const lest::test specification[] =
+{
+    CASE( "Empty string has length zero (succeed)" )
+    {
+        EXPECT( 0 == std::string(  ).length() );
+        EXPECT( 0 == std::string("").length() );
+    },
+};
+
+int main( int argc, char * argv[] )
+{
+    return lest::run( specification, argc, argv );
+}
+