404 Not Found


nginx
beegazpacho.com - GrazzMean
Uname: Linux in-mum-web1557.main-hosting.eu 5.14.0-611.42.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Mar 24 05:30:20 EDT 2026 x86_64
Software: LiteSpeed
PHP version: 8.2.30 [ PHP INFO ] PHP os: Linux
Server Ip: 91.108.106.119
Your Ip: 216.73.216.168
User: u848900432 (848900432) | Group: o51372345 (1051372345)
Safe Mode: OFF
Disable Function:
NONE

name : utils_test.go
package govalidator

import (
	"reflect"
	"testing"
)

func TestContains(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		expected bool
	}{
		{"abacada", "", true},
		{"abacada", "ritir", false},
		{"abacada", "a", true},
		{"abacada", "aca", true},
	}
	for _, test := range tests {
		actual := Contains(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected Contains(%q,%q) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestMatches(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		expected bool
	}{
		{"123456789", "[0-9]+", true},
		{"abacada", "cab$", false},
		{"111222333", "((111|222|333)+)+", true},
		{"abacaba", "((123+]", false},
	}
	for _, test := range tests {
		actual := Matches(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected Matches(%q,%q) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestLeftTrim(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		expected string
	}{
		{"  \r\n\tfoo  \r\n\t   ", "", "foo  \r\n\t   "},
		{"010100201000", "01", "201000"},
	}
	for _, test := range tests {
		actual := LeftTrim(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected LeftTrim(%q,%q) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestRightTrim(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		expected string
	}{
		{"  \r\n\tfoo  \r\n\t   ", "", "  \r\n\tfoo"},
		{"010100201000", "01", "0101002"},
	}
	for _, test := range tests {
		actual := RightTrim(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected RightTrim(%q,%q) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestTrim(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		expected string
	}{
		{"  \r\n\tfoo  \r\n\t   ", "", "foo"},
		{"010100201000", "01", "2"},
		{"1234567890987654321", "1-8", "909"},
	}
	for _, test := range tests {
		actual := Trim(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected Trim(%q,%q) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestWhiteList(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		expected string
	}{
		{"abcdef", "abc", "abc"},
		{"aaaaaaaaaabbbbbbbbbb", "abc", "aaaaaaaaaabbbbbbbbbb"},
		{"a1b2c3", "abc", "abc"},
		{"   ", "abc", ""},
		{"a3a43a5a4a3a2a23a4a5a4a3a4", "a-z", "aaaaaaaaaaaa"},
	}
	for _, test := range tests {
		actual := WhiteList(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected WhiteList(%q,%q) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestBlackList(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		expected string
	}{
		{"abcdef", "abc", "def"},
		{"aaaaaaaaaabbbbbbbbbb", "abc", ""},
		{"a1b2c3", "abc", "123"},
		{"   ", "abc", "   "},
		{"a3a43a5a4a3a2a23a4a5a4a3a4", "a-z", "34354322345434"},
	}
	for _, test := range tests {
		actual := BlackList(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected BlackList(%q,%q) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestStripLow(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   bool
		expected string
	}{
		{"foo\x00", false, "foo"},
		{"\x7Ffoo\x02", false, "foo"},
		{"\x01\x09", false, ""},
		{"foo\x0A\x0D", false, "foo"},
		{"perch\u00e9", false, "perch\u00e9"},
		{"\u20ac", false, "\u20ac"},
		{"\u2206\x0A", false, "\u2206"},
		{"foo\x0A\x0D", true, "foo\x0A\x0D"},
		{"\x03foo\x0A\x0D", true, "foo\x0A\x0D"},
	}
	for _, test := range tests {
		actual := StripLow(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected StripLow(%q,%t) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestReplacePattern(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		param3   string
		expected string
	}{
		{"ab123ba", "[0-9]+", "aca", "abacaba"},
		{"abacaba", "[0-9]+", "aca", "abacaba"},
		{"httpftp://github.comio", "(ftp|io)", "", "http://github.com"},
		{"aaaaaaaaaa", "a", "", ""},
		{"http123123ftp://git534543hub.comio", "(ftp|io|[0-9]+)", "", "http://github.com"},
	}
	for _, test := range tests {
		actual := ReplacePattern(test.param1, test.param2, test.param3)
		if actual != test.expected {
			t.Errorf("Expected ReplacePattern(%q,%q,%q) to be %v, got %v", test.param1, test.param2, test.param3, test.expected, actual)
		}
	}
}

func TestEscape(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param    string
		expected string
	}{
		{`<img alt="foo&bar">`, "&lt;img alt=&#34;foo&amp;bar&#34;&gt;"},
	}
	for _, test := range tests {
		actual := Escape(test.param)
		if actual != test.expected {
			t.Errorf("Expected Escape(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func TestUnderscoreToCamelCase(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param    string
		expected string
	}{
		{"a_b_c", "ABC"},
		{"my_func", "MyFunc"},
		{"1ab_cd", "1abCd"},
	}
	for _, test := range tests {
		actual := UnderscoreToCamelCase(test.param)
		if actual != test.expected {
			t.Errorf("Expected UnderscoreToCamelCase(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func TestCamelCaseToUnderscore(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param    string
		expected string
	}{
		{"MyFunc", "my_func"},
		{"ABC", "a_b_c"},
		{"1B", "1_b"},
		{"foo_bar", "foo_bar"},
		{"FooV2Bar", "foo_v2_bar"},
	}
	for _, test := range tests {
		actual := CamelCaseToUnderscore(test.param)
		if actual != test.expected {
			t.Errorf("Expected CamelCaseToUnderscore(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func TestReverse(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param    string
		expected string
	}{
		{"abc", "cba"},
		{"カタカナ", "ナカタカ"},
	}
	for _, test := range tests {
		actual := Reverse(test.param)
		if actual != test.expected {
			t.Errorf("Expected Reverse(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func TestGetLines(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param    string
		expected []string
	}{
		{"abc", []string{"abc"}},
		{"a\nb\nc", []string{"a", "b", "c"}},
	}
	for _, test := range tests {
		actual := GetLines(test.param)
		if !reflect.DeepEqual(actual, test.expected) {
			t.Errorf("Expected GetLines(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func TestGetLine(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   int
		expected string
	}{
		{"abc", 0, "abc"},
		{"a\nb\nc", 0, "a"},
		{"abc", -1, ""},
		{"abacaba\n", 1, ""},
		{"abc", 3, ""},
	}
	for _, test := range tests {
		actual, _ := GetLine(test.param1, test.param2)
		if actual != test.expected {
			t.Errorf("Expected GetLine(%q, %d) to be %v, got %v", test.param1, test.param2, test.expected, actual)
		}
	}
}

func TestRemoveTags(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param    string
		expected string
	}{
		{"abc", "abc"},
		{"<!-- Test -->", ""},
		{"<div><div><p><a>Text</a></p></div></div>", "Text"},
		{`<a href="#">Link</a>`, "Link"},
	}
	for _, test := range tests {
		actual := RemoveTags(test.param)
		if actual != test.expected {
			t.Errorf("Expected RemoveTags(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func TestSafeFileName(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param    string
		expected string
	}{
		{"abc", "abc"},
		{"123456789     '_-?ASDF@£$%£%^é.html", "123456789-asdf.html"},
		{"ReadMe.md", "readme.md"},
		{"file:///c:/test.go", "test.go"},
		{"../../../Hello World!.txt", "hello-world.txt"},
	}
	for _, test := range tests {
		actual := SafeFileName(test.param)
		if actual != test.expected {
			t.Errorf("Expected SafeFileName(%q) to be %v, got %v", test.param, test.expected, actual)
		}
	}
}

func TestNormalizeEmail(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param    string
		expected string
	}{
		{`test@me.com`, `test@me.com`},
		{`some.name@gmail.com`, `somename@gmail.com`},
		{`some.name@googlemail.com`, `somename@gmail.com`},
		{`some.name+extension@gmail.com`, `somename@gmail.com`},
		{`some.name+extension@googlemail.com`, `somename@gmail.com`},
		{`some.name.middlename+extension@gmail.com`, `somenamemiddlename@gmail.com`},
		{`some.name.middlename+extension@googlemail.com`, `somenamemiddlename@gmail.com`},
		{`some.name.midd.lena.me.+extension@gmail.com`, `somenamemiddlename@gmail.com`},
		{`some.name.midd.lena.me.+extension@googlemail.com`, `somenamemiddlename@gmail.com`},
		{`some.name+extension@unknown.com`, `some.name+extension@unknown.com`},
		// TODO: {`hans@m端ller.com`, `hans@m端ller.com`},
		{`hans`, ``},
	}
	for _, test := range tests {
		actual, err := NormalizeEmail(test.param)
		if actual != test.expected {
			t.Errorf("Expected NormalizeEmail(%q) to be %v, got %v, err %v", test.param, test.expected, actual, err)
		}
	}
}

func TestTruncate(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   int
		param3   string
		expected string
	}{
		{`Lorem ipsum dolor sit amet, consectetur adipiscing elit.`, 25, `...`, `Lorem ipsum dolor sit amet...`},
		{`Measuring programming progress by lines of code is like measuring aircraft building progress by weight.`, 35, ` new born babies!`, `Measuring programming progress by new born babies!`},
		{`Testestestestestestestestestest testestestestestestestestest`, 7, `...`, `Testestestestestestestestestest...`},
		{`Testing`, 7, `...`, `Testing`},
	}
	for _, test := range tests {
		actual := Truncate(test.param1, test.param2, test.param3)
		if actual != test.expected {
			t.Errorf("Expected Truncate(%q, %d, %q) to be %v, got %v", test.param1, test.param2, test.param3, test.expected, actual)
		}
	}
}

func TestPadLeft(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		param3   int
		expected string
	}{
		{"こんにちは", "xyz", 12, "xyzxyzxこんにちは"},
		{"こんにちは", "xyz", 11, "xyzxyzこんにちは"},
		{"abc", "x", 5, "xxabc"},
		{"abc", "xyz", 5, "xyabc"},
		{"abcde", "xyz", 5, "abcde"},
		{"abcde", "xyz", 4, "abcde"},
	}
	for _, test := range tests {
		actual := PadLeft(test.param1, test.param2, test.param3)
		if actual != test.expected {
			t.Errorf("Expected PadLeft(%q,%q,%q) to be %v, got %v", test.param1, test.param2, test.param3, test.expected, actual)
		}
	}
}

func TestPadRight(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		param3   int
		expected string
	}{
		{"こんにちは", "xyz", 12, "こんにちはxyzxyzx"},
		{"こんにちは", "xyz", 11, "こんにちはxyzxyz"},
		{"abc", "x", 5, "abcxx"},
		{"abc", "xyz", 5, "abcxy"},
		{"abcde", "xyz", 5, "abcde"},
		{"abcde", "xyz", 4, "abcde"},
	}
	for _, test := range tests {
		actual := PadRight(test.param1, test.param2, test.param3)
		if actual != test.expected {
			t.Errorf("Expected PadRight(%q,%q,%q) to be %v, got %v", test.param1, test.param2, test.param3, test.expected, actual)
		}
	}
}

func TestPadBoth(t *testing.T) {
	t.Parallel()

	var tests = []struct {
		param1   string
		param2   string
		param3   int
		expected string
	}{
		{"こんにちは", "xyz", 12, "xyzこんにちはxyzx"},
		{"こんにちは", "xyz", 11, "xyzこんにちはxyz"},
		{"abc", "x", 5, "xabcx"},
		{"abc", "xyz", 5, "xabcx"},
		{"abcde", "xyz", 5, "abcde"},
		{"abcde", "xyz", 4, "abcde"},
	}
	for _, test := range tests {
		actual := PadBoth(test.param1, test.param2, test.param3)
		if actual != test.expected {
			t.Errorf("Expected PadBoth(%q,%q,%q) to be %v, got %v", test.param1, test.param2, test.param3, test.expected, actual)
		}
	}
}
© 2026 GrazzMean
Beegazpacho


Let’s  Start  Your  Online  Journey  with  Beegazpacho 

Welcome to Beegazpacho,
where creativity meets strategy,
and innovation drives success.


Contact
Now


OUR CLIENTS

WhatsApp-Image-2021-12-06.png
Untitled-design-11.png
niaf-logo.png
20220406-163308-scaled.jpg
karchi-logo.png
20220405-171252.png
20220405-171309.png
20220321-161603.png
20220321-161611.png
20220321-161628.png
20220321-161244.png
20220321-161256.png
20220321-161450.png
20220321-161205.png
20220226-170222.png
20220321-161051.png
20211202-170852.png
Untitled-design-9
pidilite-png-logo-colour
logo-black-e1706125740216-qisosldqhzgcaerhdt6n4t3m4s50jr0iik48z0h5vk
Fraikin-Dayim-logo-1
hpcl-logo-2-1
services

Transforming Ideas into
Success

.01
Digital Marketing

We drive growth through data-driven strategies and cutting-edge techniques.

Learn More

.02
SEO

Improve your online visibility and rank higher on search engines with our expert SEO services.

Learn More

.03
Website Designing

We design websites that are not only visually stunning but also user-centric, ensuring seamless navigation and enhanced user experience.

Learn More

.04
App Development

Our apps are crafted to be intuitive, engaging, and functional, providing your users with an exceptional mobile experience.

Learn More

.05
Social Media Ads

Target the right audience with precision and creativity to maximize engagement and conversions.

Learn More

.06
Google Ads

Maximize ROI with precision-targeted campaigns on Google’s powerful ad platform.

Learn More

.07
Google My Business

Optimize your local presence with strategies that put your business on the map and attract more customers.

Learn More

.08
Graphic Designing

Our designs tell your brand’s story in a visually compelling way.

Learn More

.09
3D Videos

Bring your product to life with immersive and dynamic 3D explainer videos.

Learn More

about BEEGAZPACHO

creating special Things
For special brands

Join the ranks of successful brands by partnering with Beegazpacho

00+

Happy Customer

00+

Continents

Our vision is not just to be a service provider but to be your partner in growth. We see ourselves as an extension of your team, working tirelessly to ensure that your brand not only meets its goals but surpasses them.

Explore
more

Our Recent Work

Crafted with Passion and Precision

Connect now


Web Design
Design, Development & Identity

Logo Design
Design, Development & Identity

Creative Brand design
Design, Development & Identity

Product Design Marketing
Design, Development & Identity

DIGITAL MARKETING
SEO
WEBSITE DESIGNING
APP DEVELOPMENT
SOCIAL MEDIA ADS
GOOGLE ADS
GOOGLE MY BUSINESS
GRAPHIC DESINING
3D VIDEOS
Client Stories

Hear It from Those Who Know Us Best

Our clients’ success stories speak volumes about our commitment to excellence. Don’t just take our word for it—hear directly from the brands we’ve partnered with. Their testimonials highlight our ability to bring visions to life and create a lasting impact on their businesses.

“Beegazpacho feels like an extension of our team. Their content marketing and social media expertise have elevated our brand. They listen, adapt, and always deliver on time. We look forward to continuing this partnership.”

— Sarah Williams

Head of Marketing, GreenPlanet Apparel

“Beegazpacho’s data-driven strategies helped us improve our online ads, optimize our website, and enhance branding. We’ve seen great ROI and increased visibility. Their professionalism is unmatched.”

— Arvind Shah

CEO, InnovateTech Solutions

“Partnering with Beegazpacho has been a game-changer for our brand. Their creative ad campaigns and SEO services have boosted our online presence and significantly increased leads and sales. We couldn’t ask for a better partner!”

— Rina Kapoor

Marketing Director, Luxury Home Interiors

“Beegazpacho feels like an extension of our team. Their content marketing and social media expertise have elevated our brand. They listen, adapt, and always deliver on time. We look forward to continuing this partnership.”

— Sarah Williams

Head of Marketing, GreenPlanet Apparel

“Beegazpacho’s data-driven strategies helped us improve our online ads, optimize our website, and enhance branding. We’ve seen great ROI and increased visibility. Their professionalism is unmatched.”

— Arvind Shah

CEO, InnovateTech Solutions

“Partnering with Beegazpacho has been a game-changer for our brand. Their creative ad campaigns and SEO services have boosted our online presence and significantly increased leads and sales. We couldn’t ask for a better partner!”

— Rina Kapoor

Marketing Director, Luxury Home Interiors