From b0288cdfe101bb0815405f7290cff1a6c943e27a Mon Sep 17 00:00:00 2001 From: Aditya Hegde Date: Mon, 25 Mar 2024 08:47:08 +0530 Subject: [PATCH] only week 0 post on site --- pkg/helpers/helper_test.go | 29 +++++++++++++++++++++++++++++ site/content/posts/lang_test.md | 11 ++++++----- site/content/posts/markdown_test.md | 1 + site/content/posts/test_0.md | 4 ++-- site/content/posts/test_date.md | 4 ++-- site/content/posts/week-0.md | 2 +- 6 files changed, 41 insertions(+), 10 deletions(-) create mode 100644 pkg/helpers/helper_test.go diff --git a/pkg/helpers/helper_test.go b/pkg/helpers/helper_test.go new file mode 100644 index 0000000..08d6a98 --- /dev/null +++ b/pkg/helpers/helper_test.go @@ -0,0 +1,29 @@ +package helpers_test + +import ( + "fmt" + "io/fs" + "log" + "testing" + "testing/fstest" +) + +type Helper struct { + ErrorLogger *log.Logger + SiteDataPath string +} + +func TestCopyDirectoryContents(t *testing.T) { + t.Run("Testinf copying contents from A to B", func(t *testing.T) { + fsMock := fstest.MapFS{ + "index.md": {Data: []byte("# Index Page")}, + "about.md": {Data: []byte("# About Page")}, + } + + fs.WalkDir(fsMock, ".", func(path string, d fs.DirEntry, err error) error { + fmt.Printf("%s\n", path) + return nil + }) + + }) +} diff --git a/site/content/posts/lang_test.md b/site/content/posts/lang_test.md index f163148..98a718c 100644 --- a/site/content/posts/lang_test.md +++ b/site/content/posts/lang_test.md @@ -4,15 +4,16 @@ author: John Doe date: 2024-02-23 scripts: type: post -tags: - - rust - - C +draft: true +tags: + - rust + - C --- ## struct in rust ```rust -struct Vector2D { +struct Vector2D { x: f64, y: f64, } @@ -51,7 +52,7 @@ void ex(int *v, char *syn){ case 62: if(st!=1){*v = *v>>1;}else{printf("synerr");return;} break; case 64: if(st == 1){st = 0;*p=*v;}else{st=1;} break; case 38: if(st == 1){st = 0;*v=*p;}else{st=1;}break;// & is used to get value - + // operations, st == 1, for subsequent value for operation type case 37: if(st==1){ syn++; diff --git a/site/content/posts/markdown_test.md b/site/content/posts/markdown_test.md index 89e8b37..686ad71 100644 --- a/site/content/posts/markdown_test.md +++ b/site/content/posts/markdown_test.md @@ -7,6 +7,7 @@ categories: - Programming scripts: type: post +draft: true tags: - test-post --- diff --git a/site/content/posts/test_0.md b/site/content/posts/test_0.md index db6ccd6..f117211 100644 --- a/site/content/posts/test_0.md +++ b/site/content/posts/test_0.md @@ -1,9 +1,9 @@ --- title: Chronological Test 2 date: 2023-01-02 -draft: false +draft: true type: post description: This is a test description tags: - - test-post + - test-post --- diff --git a/site/content/posts/test_date.md b/site/content/posts/test_date.md index 84481d6..7e163eb 100644 --- a/site/content/posts/test_date.md +++ b/site/content/posts/test_date.md @@ -1,6 +1,6 @@ --- title: Chronological Test -date: 2024-01-01 -draft: false +date: 2024-01-01 +draft: true type: post --- diff --git a/site/content/posts/week-0.md b/site/content/posts/week-0.md index 0538dba..89bef03 100644 --- a/site/content/posts/week-0.md +++ b/site/content/posts/week-0.md @@ -2,7 +2,7 @@ title: week-0 date: 2024-03-02 type: post -draft: true +draft: false tags: - progress ---